Image pre-processing to remove noise

Hi. Is there any image pre-propcessing technique to remove noise from binary images? Please see attached image, I want to remove the objects that are not very straight lines and are connected together, a cxongregation of pixels that look like small circles in the image.
Any hints with MATLAB commands can really help.
Thanks.

 採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 5 月 30 日
編集済み: KALYAN ACHARJYA 2021 年 5 月 30 日

0 投票

Absolutely possible, you can remove the white pixels based on area (Extract objects from binary image by size) and do some AND or OR logical Operation to get the resultant image.

4 件のコメント

SS
SS 2021 年 5 月 30 日
Hi, thanks for youre reply. I am getting this error:
Error using bwpropfilt
Expected input number 1, BW, to be one of these types:
logical
Instead its type was uint8.
Error in bwpropfilt>parse_inputs (line 121)
validateattributes(bw, {'logical'}, {'nonsparse', '2d'}, mfilename, 'BW', 1);
Error in bwpropfilt (line 58)
[bw, I, attrib, p, direction, conn] = parse_inputs(args{:});
Error in bwareafilt (line 34)
bw2 = bwpropfilt(bw, 'area', p, direction, conn);
KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 5 月 30 日
編集済み: KALYAN ACHARJYA 2021 年 5 月 30 日
data=~bwareafilt(input_binary_image,20);
%........................^ Set as per requirement
result=input_binary_image & result;
figure,imshow(result);
Or see regionprops function and do accordingly
Image Analyst
Image Analyst 2021 年 5 月 30 日
How did you get your binary image, bw? By thresholding your original gray scale image? It should be logical then. You can't call it on a gray scale image.
bw = grayImage < 100; % or whatever
bw2 = bwpropfilt(bw, 'area', p, direction, conn);
SS
SS 2021 年 5 月 30 日
編集済み: SS 2021 年 5 月 30 日
The raw binary image is obtained by thresholding and combining few gray images.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImage Processing Toolbox についてさらに検索

質問済み:

SS
2021 年 5 月 30 日

編集済み:

SS
2021 年 5 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by