How can I know if an image read with imread is binary in MATLAB
I did this :
Img = imread(IMGsrc);
T = Img== 1 | Img == 0;
If min(min(T)) == ??????
imshow(T);
end
????? = ??????
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two ways you can test for binary images.
The simplest one is to test whether the image is a logical array (a logical array is returned by functions in the image processing toolbox that return binary image)
Alternatively, you check whether all pixels are either 1 or 0