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 CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by