Determining the Major axis and Minor Axis on Bubble that has Particles Attached to its Surface as Well

조회 수: 1 (최근 30일)
Hi All,
I have attached a sequence of pictures of bubbles in water that have particles attached to its surface.
What I am trying to do is isolate ONLY the bubble surface, and determine the Major and Minor Axis for it. However, I have been failing to do so because MATLAB's MajorAxisLength and MinorAxisLength takes both the bubbles and the particles as a whole instead of isolating only the bubble surface.
I am ultimately trying to determine the Major and MinorAxisLength of ONLY the bubble as it rises through the liquid, as you can see in the sequence of pictures attached.
In this specific case, the particles attached are very few. But ultimately I would like to be able to isolate the bubble surface no matter how many particles are attached on its surface.
Any help in this matter would be greatly appreciated, as I rushing for a PhD deadline. Thanks!

답변 (1개)

Maneet Kaur Bagga
Maneet Kaur Bagga 2023년 10월 6일
Hi Syamsundar,
As per my understanding to isolate the bubble surface and determine its Major and Minor Axis. To achieve this kindly refer to the following steps:
  • Load the image and apply preprocessing by enhancing its contrast using the "imadjust" function.
  • Apply thresholding to convert the enhanced grayscale image into a binary image using the "imbinarize" function. The threshold value can be determined by the "graythresh" function.
  • Morphological operations, such as erosion and dilation, should be performed using the "imerode" and "imdilate" functions, respectively. These operations help refine the segmented bubble surface and remove noise or small particles.
  • Conduct the connected component analysis using the "bwlabel" function to label individual connected regions in the binary image. The "regionprops" function should then be used to calculate properties for each connected component, including "Area", "MajorAxisLength", and "MinorAxisLength".
  • The largest connected component, assumed to correspond to the bubble surface, is identified by finding the connected region with the maximum Area.
  • Finally, the MajorAxisLength and MinorAxisLength properties should be extracted from the selected connected component, representing the bubble surface.
Refer to the MATLAB Documentation for implementation of functions:
Regards,
Maneet Bagga

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by