MATLAB: Counting pixel of an image

compressionimage thresholding

i have used the thresholding for image ..
the command is
length(find(abs(cw)<=50));
im(length(abs(cw)<=50))=0 ;
(1)for examble 42447 coeffients made to be zero out of 65656. my doubt is whether that remaing (23089 ) pixel only present in that image or else 0 will be presented for the whole 65536 ..
(2)how to count or calculate the number of pixels present in that image ?
(3)i apply the wavelet transform.. after that i apply this can i use this threshold for compression ?
pleased to ask reply from all ..

Best Answer

Responding to your comment
(1) The number of pixels under 50 is given more simply by
numPixelsLessThan50 = sum(sum(cw<50));
No need for find() and abs().
(2) A pixel contains the value of your image array at a certain location. I don't know what you are calling coefficients. I don't have the wavelet toolbox so I can't answer any questions about that.
(3)I don't understand what #3 is saying or asking. Something about wavelets, setting to zero, and compression but it's not clear. Ask someone else to reword it.
Related Question