フィルターのクリア

select labeled object in image

11 ビュー (過去 30 日間)
researcher
researcher 2012 年 7 月 2 日
コメント済み: SSC 2021 年 1 月 7 日
Dear all,
i've made labeling to an image and i'm trying to select objects by mouse click in order to delete them.
can anyone help me to do this. i've been trying for long time but couldn't do it,
thanks in advance

採用された回答

Sean de Wolski
Sean de Wolski 2012 年 7 月 2 日
編集済み: Sean de Wolski 2012 年 7 月 2 日
Here, your very own Blob remover:
function removeBlob
I = bwlabel(imfill(imread('coins.png')>100,'holes'));
h = imshow(label2rgb(I,jet(numel(unique(I(:)))),[0 0 0]));
set(h,'buttondownfcn',{@removeIt,I})
end
function removeIt(src,~,I)
cp = round(get(get(src,'parent'),'currentpoint'));
val = I(cp(3),cp(1));
I(I==val) = 0;
set(src,'cdata',bsxfun(@times,uint8(logical(I)),get(src,'cdata')));
end
  2 件のコメント
Image Analyst
Image Analyst 2015 年 1 月 31 日
sara's "Flag" removed and moved here:
Simple and short and useful.
SSC
SSC 2021 年 1 月 7 日
Hi Sean,
how can I modify the code for selecting the blobs from binary Image by mouse click and delete remaining of the blobs (Objects).

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by