filling open gaps in binary image object

조회 수: 4 (최근 30일)
Mohammad Hdaib
Mohammad Hdaib 2019년 11월 23일
댓글: Mohammad Hdaib 2020년 1월 10일
Hello...
i am working with experiment to find out the diameters of generated bubbles.
here is the original image.
fff.PNG
here is the processed one.
Capture.PNG
here is an object from idx list:
object.PNG
this is an object in photo whivh have a same size as the processed one but with zoom in.
my question is:
how to make such an object to appear more circular???
i mean by more circular like this:
o2.PNG
Regards,
  댓글 수: 2
Akira Agata
Akira Agata 2019년 11월 26일
How about applying bwconvhull function ?
Mohammad Hdaib
Mohammad Hdaib 2020년 1월 7일
Mr. Akira,
really thanks.
bwconvhull gave me a very nice results.

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

채택된 답변

Image Analyst
Image Analyst 2020년 1월 7일
I've done image processing on lather/suds/bubbles for several projects. First of all you need to get a good image without specular reflections, and this means using crossed polarizers and probably a broad, diffuse overhead light source. Of course it's best if you can press the bubbles between two plates in a monolayer, or against one glass plates if two are not possible.
If you can, try to make the background black and free of clutter and objects.
Then to get rid of interior walls of other bubbles through larger bubbles above you might try a morphological opening.
  댓글 수: 4
Adam Danz
Adam Danz 2020년 1월 7일
편집: Adam Danz 2020년 1월 7일
Yep, that makes a lot of sense. Thanks.
I suppose pressing them won't unintentionally combine too many of the adjacent bubbles.
Mohammad Hdaib
Mohammad Hdaib 2020년 1월 10일
my special thanks to u sir,
the photo i submitted was just a trial for the code and for further photos i used black screen and it enhanced it alittle bit......
but my biggest problem was specular reflections and now i have an idea how to solve it.
thx,

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

추가 답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 23일
편집: KALYAN ACHARJYA 2019년 11월 23일
#Approximate
se=strel('diamond',3);
BW2=~imdilate(BW1,se); % 2nd Binary image
BW3=bwareafilt(BW2,1);
BW4=imerode(BW3,se);
Do the smothing & measure approximated distance (dist on multiple direction & do average to find diameter) or regionprops.
  댓글 수: 1
Mohammad Hdaib
Mohammad Hdaib 2020년 1월 7일
thx for ur answer,
i already tried regionprops, but my question isn't about: how to find the diameter???. it is about how to make objects more circular and look like real bubbles???
i tried convhull and it gave me a very nice results.....
thx.....

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

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by