İn Matlab, I want to threshold a grayscale image to convert it to a black & white image:
for k=1:Y
for i=1:X
if gray(i,k)>T
gray(i,k)=1;
else
gray(i,k)=0;
end
end
end
What do you think should be the value of T?
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.
If I were you, I would use the median:
PS: you should use this more efficient code in general: