I am converting a grayscale signature image to thin image but not getting the desired output
조회 수: 5 (최근 30일)
이전 댓글 표시

after applying the im2bw(img,graythresh(img)) function i get the following image

but the image is not smooth enough after applying thining on the said image i get the following

so how to get rid of extra roots from the thin image and get smooth signature skeleton
댓글 수: 0
채택된 답변
Anand
2015년 9월 17일
It looks like you need to clean up the binary image a little before thinning.
This worked for me:
bw = im2bw(img,graythresh(img));
% remove some of the noisy edges in the mask.
bw_clean = imopen(bw, strel('disk',1));
% remove small foreground objects.
bw_clean = bwareaopen(bw_clean, 25);
% invert the image and thin it.
bw_thin = bwmorph(imcomplement(bw_clean), 'thin', Inf);
댓글 수: 9
Image Analyst
2015년 9월 18일
imfill() will fill completely surrounded holes and leave exterior boundaries unchanged. imclose() will fill interior holes and will smooth out exterior boundaries.
Image Analyst
2015년 9월 18일
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
