Borrar filtros
Borrar filtros

How to obtain value from histogram?

1 visualización (últimos 30 días)
nurul hafizah
nurul hafizah el 4 de Mayo de 2015
Comentada: Star Strider el 5 de Mayo de 2015
I am using imhist to create histogram from an image. Now I want to know the value of each bar from Y-axis in the histogram. Can I know how to do that??

Respuesta aceptada

Star Strider
Star Strider el 4 de Mayo de 2015
You only need to ask imhist to output those data:
[counts,binLocations] = imhist(I)
  4 comentarios
nurul hafizah
nurul hafizah el 5 de Mayo de 2015
do you know how to calculate mean using counts value?
Star Strider
Star Strider el 5 de Mayo de 2015
You need both ‘counts’ and ‘binLocations’:
image_mean = sum(counts.*binLocations)/sum(counts);

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Histograms 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