Bitplane coding is nothing but chopping off bits for each image plane (incase of color image) to reduce amount of memory utilized. And important point is that most signifcant bit contains the most information, while the least signifcant bit contains only minute information of image. For example, if you set the 2 LSBs to 0, then you will see a blurred version of the image.
After using bit-plane coding, you may use run-length/level encoding to perform compression.
After reading the image, You will obtain a matrix of pixel intensities. We know that for a gray-scale image, the intensity values range from 0 to 255. But all the intensities may not be used by the image you have chosen.
For example, a Lena image of 512 x 512 has min. intensity value of 32 and max. intensity value of 192. Also, some of the intensity values b/w 32 and 192 may not be used.
All you have to do is make a list of all the intensity values i.e., 0 - 255 and find out the no. of pixels that belong to each of these intensities. some entries of intensities may have no pixels belonging to it. So, you can discard them and use the intensity values which has non-zero number of pixels belonging to it. And you can divide those numbers in each entry by total number of pixels to obtain the frequency (probability) of each of these intensities in your image. Then these intensities are your symbols with their corresponding probabilities.
Now you have the familiar parameters to use the Arithmetic Coding. :)
Any source coding technique is the final step in encoding. If you want to directly implement this method on Image, you need to add a few steps.
1. Read an image using "imread" command.
2. From the image matrix, find out the different intensity values that are used in the image and make out a list of them.
3. Find the freq. of occurence (probability) of each of intensity values in the image.
Now the Intensity values list make up the source symbols and freq. of occurence will be their corresponding probabilities. Then you can supply the those parameters to this function.
I hope i have clarified your question. If not, please elaborate your question.