how to mask certain regions when using superpixel
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
When we are using superpixel, how can we only keep the certain region based on the superpixel index and mask the rest of the image?
Thanks.
댓글 수: 0
채택된 답변
darova
2019년 9월 11일
Try this simple example
clc,clear
A = imread('image.png');
[L,NumLabels] = superpixels(A,N);
ix = find(L == 1); % find first superpixel
L1 = L*0;
L1(ix) = 1;
subplot(121)
imshow(A)
subplot(122)
imshow(L1)
Accept the asnwer if it helped
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!