MATLAB: Thresholding an Image in MATLAB

computer vision system toolboxexpression detectionImage Acquisition Toolboximage processingMATLAB

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');
end
end
selected = (min_threshold >= A) & (B <= max_threshold);
thresholded_image(selected) = A;
return;

Best Answer

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"?
Related Question