How can I find the intensity value which has the maximum number of pixels in the histogram? I'm using grayscale image. please I need a code ..

1 次查看(过去 30 天)
how can find a function to solve this?

采纳的回答

Walter Roberson
Walter Roberson 2016-10-16
[counts, edges] = histcounts(YourIntensityImage(:), 0:255);
[maxcount, maxidx] = max(counts);
most_common_intensity = edges(maxidx);
  14 个评论
Ahmad Yahya
Ahmad Yahya 2016-10-17
I've experimented this and it didn't give the required result..I need to remove all the darkest text (old Arabic hand writing)??

请先登录,再进行评论。

更多回答(1 个)

Image Analyst
Image Analyst 2016-10-16
For a more general and somewhat different solution, you might look at the color frequency image: http://www.mathworks.com/matlabcentral/fileexchange/28164-color-frequency-image

类别

Help CenterFile Exchange 中查找有关 Wavelet Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by