フィルターのクリア

How to remove this small round shaped error highlighted in the image below.

1 回表示 (過去 30 日間)
Md. Ashikur Rahman Any
Md. Ashikur Rahman Any 2021 年 7 月 9 日
回答済み: DGM 2021 年 7 月 9 日
How to remove this small round shaped error highlighted in the image below.
  2 件のコメント
KSSV
KSSV 2021 年 7 月 9 日
You want to fill it with black?
DGM
DGM 2021 年 7 月 9 日
編集済み: DGM 2021 年 7 月 9 日
Describe what makes this the error. Is it the size? The location? Is this the only one in the image? Is this the only image that needs to be processed? Is this the whole image?
You said "small round error", but you highlighted the entire blob. I'm assuming you're just trying to get rid of the round part, but they're a 4-connected group based on the strel chosen for dilation. Is that even an error?
You might want to post a copy of the actual image. Captured plots of images are basically screenshots. They contain extraneous padding and are subject to destructive interpolation and aren't intended for anything other than looking at with your eyeballs. If you want anyone to be work with your actual image, post the actual image instead of a damaged copy.

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

回答 (1 件)

DGM
DGM 2021 年 7 月 9 日
Again, this is subject to questions, and is based on a modified screenshot.
% load the image and fix it
ip = imread('image.png');
ip = cropborder(ip,[NaN NaN NaN NaN]); % from MIMT
ip = rgb2gray(ip)>245;
% break the group and remove small blob
ip = ~bwmorph(~ip,'bridge');
ip = bwareaopen(ip,100);
% display
imshow(ip)
Cropborder() is from MIMT on the FEX. You shouldn't need to use it, because trust you're not processing screenshots.

Community Treasure Hunt

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

Start Hunting!

Translated by