how to remove a thick boundary?

1 回表示 (過去 30 日間)
Bekhtaoui Abdelhakim
Bekhtaoui Abdelhakim 2019 年 5 月 26 日
編集済み: Luis J Gilarranz 2019 年 5 月 26 日
hi everyone please can anyone tel me how to remove this thick boundary from this fingerprint image thanks for helpingimg_test5_nrm.jpg

回答 (1 件)

Luis J Gilarranz
Luis J Gilarranz 2019 年 5 月 26 日
編集済み: Luis J Gilarranz 2019 年 5 月 26 日
Mmmh, it seems that "imclearborder" won't work. However, that thing is going to be the largest connected component of the image. You can detect it using "bwconncomp". Actually, the documentation for "bwconncomp" has the exact example that you need:
%Find the number of connected components in the image.
CC = bwconncomp(BW)
%Determine which is the largest component in the image and erase it (set all the pixels to 0).
numPixels = cellfun(@numel,CC.PixelIdxList);
[biggest,idx] = max(numPixels);
BW(CC.PixelIdxList{idx}) = 0;
%Display the image, noting that the largest component happens to be the two consecutive f's in the word different.
figure
imshow(BW)

カテゴリ

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

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by