sharpening or cleaning this binary mask
이전 댓글 표시
Hi, Image Analyst.,Could you please help me in sharpening or cleaning this binary mask please which is attached here. I have tried alot and got this refinement only. please suggest something.
답변 (1개)
Image Analyst
2020년 8월 1일
You could blur the image and threshold it.
windowWidth = 7; % Whatever - bigger gives more smoothing, experiment with different values.
kernel = ones(windowWidth, windowWidth) / windowWidth^2;
smoothBW = conv(single(bw), kernel, 'same') > 0.5;
Or you could use a savitzky Golay filter to smooth the boundaries and then use poly2mask on the smoothed boundaries. Demo attached.
Or you could use activecontour(). Demo attached.
댓글 수: 1
Image Analyst
2020년 8월 7일
rsnandi, are you still there????
카테고리
도움말 센터 및 File Exchange에서 Interpolation of 2-D Selections in 3-D Grids에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!