how to generate histograms for superpixel?

1 回表示 (過去 30 日間)
Ad
Ad 2017 年 4 月 22 日
コメント済み: Ad 2017 年 4 月 23 日
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?

採用された回答

Image Analyst
Image Analyst 2017 年 4 月 22 日
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 件のコメント
Ad
Ad 2017 年 4 月 23 日
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?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by