Filling specific holes in an image without changing edges

조회 수: 4 (최근 30일)
AAS
AAS 2022년 7월 24일
편집: Matt J 2022년 7월 24일
I tried doing a pixel wise hole filling operation that is if its surrounded by pixels whose sum exceeds a certain number, fill it. However, this seems to thicken edges as expected. Is there any way I can fill these small holes in the image without changing edge dimensions?
Thanks
  댓글 수: 1
Catalytic
Catalytic 2022년 7월 24일
편집: Catalytic 2022년 7월 24일
However, this seems to thicken edges as expected.
No idea what you're talking about. Where is the demonstration of this?

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

답변 (1개)

Matt J
Matt J 2022년 7월 24일
편집: Matt J 2022년 7월 24일
k=[1 1 1; 1 0 1; 1 1 1];
mask=conv2(YourImage,k,'same')>threshold;
YourImage=regionfill(YourImage,mask);

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by