Low contrast and high contrast
6 次查看(过去 30 天)
显示 更早的评论
Need some help..... How i know low contrast or high contrast in a picture...? (and need code matlab)..?
And if that can, i want know how to get value low contrast and high contrast...? (and need code matlab)...?
采纳的回答
Image Analyst
2019-12-17
imadjust() might be the function you're looking for. Try it.
5 个评论
Image Analyst
2019-12-17
Yes. Just pick something like 0.5 or 3.0.
To display the range, use fprintf()
newImage = uint8(someFactor * double(grayImage));
imshow(newImage);
fprintf('The max value = %f, the min value = %f.\n', max(newImage(:)), min(newImage(:)));
更多回答(1 个)
KALYAN ACHARJYA
2019-12-17
编辑:KALYAN ACHARJYA
2019-12-17
In somehow I feel it as a subjective term, still you can find it from historam of the image. As per my basic understanding contrast of an image represents the gray value distribution (variation) in the image (More variations more contrast), go for probability distribution function.
Though you can estimate this way (somehow)
con_data=max(garyImage)-min(grayImage);
If the con_data result is maximum as high contrast image, somehow you have to decide the threshold, whether high or low (0-255 in 8 bit gray image)
2 个评论
Rik
2019-12-17
Don't forget that an image is probably not a vector, so your code would result in a vector of values.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!