MATLAB: How to find the pixel that drop from 0-100

histogram

Here it is my code:
global a;
a=imread('.jpg')
a_gray=rgb2gray(a)
subplot(1,2,1)
imshow(a_gray)
subplot(1,2,2)
imhist(a_gray)
intensityValue(0,100)

Best Answer

idx = a >= 0 & a <=100 ;
iwant = nnz(idx(:)) ;