How to enhance contrast on a grayscale image?

11 ビュー (過去 30 日間)
Mr M.
Mr M. 2017 年 12 月 29 日
コメント済み: Mohamed Moawed 2020 年 4 月 5 日
How to call eqhist to make the lowest value white and the highest value balck?
  1 件のコメント
Jan
Jan 2017 年 12 月 29 日
@Mr M.: Please spend more time when asking a question to explain any details. Although the readers could guess, what your inputs are and what you want to get as output, it is more efficient, if you explain this explicitly. It is not clear what "eqhist" is, maybe you mean "histeq"?

サインインしてコメントする。

回答 (2 件)

Jan
Jan 2017 年 12 月 29 日
If you mean "histeq", which details is not clear after reading the documentation: https://www.mathworks.com/help/images/ref/histeq.html ?
  3 件のコメント
Jan
Jan 2018 年 1 月 4 日
@Mr M.: What are your inputs? If the lowest value should be white and the highest black, you have to subtract the output of histeq from the highest possible value, but it depends on the type of your input, what this is. Example:
Img = rand(640, 480) * 0.5; % dark grey image, double format
Img2 = 1 - histeq(Img);
% UNTESTED - I do not have the signal processing toolbox
Mohamed Moawed
Mohamed Moawed 2020 年 4 月 5 日
you can use imadjust() command

サインインしてコメントする。


Image Analyst
Image Analyst 2018 年 1 月 4 日
histeq() is junk. Histogram equalization produces harsh, unnatural looking images. Don't do it. Use imadjust() instead. It uses a linear contrast stretch giving a more realistic and natural appearance for the output image.
  1 件のコメント
Mohamed Moawed
Mohamed Moawed 2020 年 4 月 5 日
you can use imadjust() command

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by