Borrar filtros
Borrar filtros

How can i plot Histogram for this??

1 visualización (últimos 30 días)
dp sb
dp sb el 21 de Jul. de 2015
Comentada: Steven Lord el 21 de Jul. de 2015
How can i plot histogram for an image with 3 bins, where the bins holds the pixel values falling in the region 0-40, 41-90, 91-255. Also how can i write these stats, as in the number of pixels in each of those regions. Plz Help ?

Respuesta aceptada

Image Analyst
Image Analyst el 21 de Jul. de 2015
Try
edges = [0,41,91,255];
pixelCounts = histcounts(grayImage(:), edges);
  4 comentarios
dp sb
dp sb el 21 de Jul. de 2015
It works. Thank You!
Steven Lord
Steven Lord el 21 de Jul. de 2015
Or call HISTOGRAM instead of HISTCOUNTS. If you want both the counts and the graphics object, call HISTOGRAM with an output argument and take a look at the properties of that graphics object.

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