필터 지우기
필터 지우기

sharpening or cleaning this binary mask

조회 수: 10 (최근 30일)
rsnandi
rsnandi 2020년 7월 31일
댓글: Image Analyst 2020년 8월 7일
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.
  댓글 수: 2
jonas
jonas 2020년 7월 31일
I am not image Analyst, but I'm guessing you will get a better answer if you describe your desired image. Personally I don't see a lot of noise in your image. Do you want smoother edges? Do you want to fill the small black areas inside the main blob?
rsnandi
rsnandi 2020년 8월 1일
Thanks Jonas , yes I want to smoother edges and fill the black area inside the main blob. Morphological operations not doing good. They deform the main blobs. Please suggest something. Thanks

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
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.

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by