Hey,
I wanted to detect and measure the diameter of the bubbles (elliptical and circular) in this image. I tried various techniques but couldn't do so.
Please help me out.

 채택된 답변

darova
darova 2021년 1월 31일

0 개 추천

  • binarize image
  • use regionprops with EquivDiameter option

댓글 수: 4

Could you please share the code.
Actually the image has some reflections and noise in general so, the results I'm getting aren't very satisfactory. So a code would be very helpful.
darova
darova 2021년 1월 31일
Try imclose to filter your image a bit
Use bwareaopen to remove small undesired object
Avdhesh Vermani
Avdhesh Vermani 2021년 1월 31일
편집: Avdhesh Vermani 2021년 2월 5일
Hey, could you suggest some way as how to binarize the image so that the bubbles and the background are segmented separately like I just want the bubbles and nothing else in the background. Or if you could suggest some way to segment bubbles from the background that would also be very helpful.
darova
darova 2021년 2월 5일
Honestly i can't. You have a hard image. Don't know how to separate bubbles. THe only ideas i had - i said before

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

추가 답변 (1개)

Image Analyst
Image Analyst 2021년 1월 31일

0 개 추천

Sounds like you got it figured out since you accepted an answer but I'd first have improved your image capture by placing a black velvet shroud behind your vessel to remove background clutter. Then I'd take an image with no bubbles and subtract the subtract that from the image with bubbles using imabsdiff(). Then threshold and call regionprops(). Realize that the bubbles may overlap and there is no way you can split them apart unless you do something like make a real time CT image. But the area fraction or size distribution of what you do have may be enough for you do differentiate different bubble makers or different bubble size distributions.
But anyway, glad you got it figured out.

댓글 수: 8

Avdhesh Vermani
Avdhesh Vermani 2021년 1월 31일
편집: Avdhesh Vermani 2021년 2월 5일
Hey, could you suggest some way as how to binarize the image so that the bubbles and the background are segmented separately like I just want the bubbles and nothing else in the background. Or if you could suggest some way to segment bubbles from the background that would also be very helpful.
I did. And I'm waiting for you to upload a new picture with the black background. When can you post it?
Avdhesh Vermani
Avdhesh Vermani 2021년 2월 6일
편집: Avdhesh Vermani 2021년 2월 6일
The thing is that the images were taken sometime back and now it is really not possible for me to take new images. I tried segmentation based on texture and it helped me remove some issues but overall it didn't help much.
Maybe it was from a video. Is there some way to get an image of the apparatus before the bubbles started appearking? Like from the first frame of the video?
Avdhesh Vermani
Avdhesh Vermani 2021년 2월 8일
편집: Avdhesh Vermani 2021년 2월 8일
I have attached a few images; one of an empty beaker, one of a beaker filled with the solution. I have also attached the full bubble image. Hope this helps.
It might help but you'll need to scale your image by the ratio of the intensities, because you can't subtract two images if they're not the same exposures. And it looks like they're not.. Pick some part of the scene that is not expected to change at all then divide the image by the value there and multiply by the value of the reference image there. Then call imabsdiff(). See if that works. Hopefully everything will subtract away except the bubbles. If that doesn't work you may not be able to do it unless you manually trace the bubbles or snap new images.
Avdhesh Vermani
Avdhesh Vermani 2021년 2월 9일
편집: Avdhesh Vermani 2021년 2월 9일
I'll try this but can you tell me how to manually trace the bubbles? Like I need to draw ROI using image segmenter app right, or are there other methods as well?
See attached demos for imfreehand().

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

질문:

2021년 1월 31일

댓글:

2021년 2월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by