# of counts in whole image vs #counts in masked image +mask? shoul be same or not???
Show older comments
Dear all,
I did histograms of :
1. whole image
2. image masked
3. image with inverted masked
I would expect sum of counts in 2+3 shall be same as in 1. But it is not. So is this because of the mask line width (I do masking with imfreehand).. and double assigning of some pixels to masked and reversed masked region?, or is my procedure somehow wrong. Scheme is as follows
masked_image=whole_image.*mask;
inverse_masked_image=whole_image.*(~mask)
the numbers differ like 1=65536, and(2+3)=78086..
thanks!
4 Comments
Image Analyst
on 17 May 2014
You forgot to show your histogram code.
Aga
on 17 May 2014
Image Analyst
on 17 May 2014
I don't have that image. Can you illustrate with a standard demo image like cameraman.tif or something?
Aga
on 17 May 2014
Accepted Answer
More Answers (0)
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!