>>I=imhist(your_image); %Save the histogram of the image in the variable I
>>I(1) %You get a value y for x = 0 because your image is binary and you have only 2 value in variable I
>>I(2) %You get a value y for x = 1
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!