how can I view each individual superpixel?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have performed SLIC algorithm. I want to view each individual pixel and what are the superpixels connected to each other ?
Thank you
1 Kommentar
Antworten (1)
Image Analyst
am 14 Dez. 2023
The superpixels algorithm gives you the labeled image, where each superpixel is assigned an ID number. To view them all you could do this
numregions = max(labeledImage);
for k = 1 : numregions
thisRegion = ismember(labeledImage, k);
imshow(thisRegion);
% Pause a bit for you to see it.
pause(0.5);
end
To see which regions are adjacent, you can use graycomatrix to give the gray level co-occurrence matrix. It will tell you which labels are right next to each other. I'm attaching a demo for that function.
0 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!