フィルターのクリア

Change exact area in binary images from 1 to 0

2 ビュー (過去 30 日間)
Eliska Paulikova
Eliska Paulikova 2022 年 11 月 5 日
コメント済み: Eliska Paulikova 2022 年 11 月 5 日
Hello, I have this binary image, I know the center and the radius of that circle, and I would like to change this circle to black so from 1 to 0. My goal is to see only the little line without the circle. How can I do it?
Thank you so much

採用された回答

Matt J
Matt J 2022 年 11 月 5 日
load BW
hole = bwareafilt(~BW,1,'smallest') ;
BW=BW& ~imdilate(hole,strel('disk',5));
imshow(BW)
  3 件のコメント
Matt J
Matt J 2022 年 11 月 5 日
編集済み: Matt J 2022 年 11 月 5 日
You're welcome, but please Accept-click the answer if it addresses your question.
The ~ operator is logical complement,
~0,
ans = logical
1
~1
ans = logical
0
Eliska Paulikova
Eliska Paulikova 2022 年 11 月 5 日
Thank you so much

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by