how to mask certain regions when using superpixel

2 ビュー (過去 30 日間)
Sule Tekkesinoglu
Sule Tekkesinoglu 2019 年 9 月 11 日
コメント済み: Sule Tekkesinoglu 2019 年 9 月 12 日
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.

採用された回答

darova
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!

Translated by