Azzera filtri
Azzera filtri

how to generate histograms for superpixel?

1 visualizzazione (ultimi 30 giorni)
Ad
Ad il 22 Apr 2017
Commentato: Ad il 23 Apr 2017
I have an RGB image converted into Lab image. Generated 44 superpixels and calculated MeanIntensities and pixellist and centroids.How to generate histograms for each superpixel?

Risposta accettata

Image Analyst
Image Analyst il 22 Apr 2017
You can loop over the properties extracted by regionprops
props = regionprops(labeledImage, superPixelImage, 'PixelValues');
for k = 1 : length(props)
% Get the pixel values of this region alone:
thesePixelValues = props(k).PixelValues;
% Histogram this region's gra levels.
counts = imhist(thesePixelValues);
% Now do something with counts....
end
  1 Commento
Ad
Ad il 23 Apr 2017
for i=1 : length(lprops)
thesePixelValues = lprops(i).PixelValues;
counts = imhist(thesePixelValues);
end
I got counts value as 256*1 double. Every value is zero.
Can you explain this?

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by