Borrar filtros
Borrar filtros

Getting values of the histogram without actually plotting it

59 visualizaciones (últimos 30 días)
D_coder
D_coder el 30 de Ag. de 2018
Comentada: D_coder el 4 de Sept. de 2018
Hello, I am working on automatically adjusting the threshold for an image. How do I select a particular percentage of the peak of the histogram for thresholding without actually plotting the values. The image below was plotted using histogram(Image).

Respuestas (1)

the cyclist
the cyclist el 30 de Ag. de 2018
Sounds like you need the histcounts command.
  3 comentarios
the cyclist
the cyclist el 31 de Ag. de 2018
The histcounts command
N = histcounts(X);
outputs the bin counts, without plotting them.
You could find the maximum value of this
maxN = max(N);
and then set your threshold as some percentage of this maximum value.
D_coder
D_coder el 4 de Sept. de 2018
thats a great idea indeed

Iniciar sesión para comentar.

Categorías

Más información sobre Image Filtering and Enhancement en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by