Thresholding an Image in MATLAB?
Show older comments
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;
Accepted Answer
More Answers (0)
Categories
Find more on Display and Exploration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!