Thresholding an Image in MATLAB?

8 views (last 30 days)
Anand on 17 Mar 2014
Commented: Anand on 18 Mar 2014
if the distance is less it would output a smiling expression and if the distance is more it would output a neutral expression.
A = smile expression B = Neutral expression
A = 129;
B = 188;
Threshold = 155;
if A > B
error('threshold_grayscale_image : min_threshold is greater then max_threshold');
selected = (min_threshold >= A) & (B <= max_threshold);
thresholded_image(selected) = A;
Anand on 18 Mar 2014
yes thats correct, any ideas?

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 17 Mar 2014
I don't know what you mean. Do you mean you want to display an image of someone smiling or neutral depending on the condition? Do you have images for those two cases?
And how are you determining the "distance"?
Anand on 18 Mar 2014
Thank you ever so much!! I have got the threshold to run the want it to.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!