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 ..

2 visualizaciones (últimos 30 días)
how can find a function to solve this?

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 16 de Oct. de 2016
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

Community Treasure Hunt

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

Start Hunting!

Translated by