Hey Yaisel
I understand that you wish to remove "bubbles" from the image.
You can consider using region-based segmentation techniques to identify and separate bubbles from the rest of the image. Use the "regionprops" function to extract properties of connected components (regions) in the binary image. You can then filter out regions based on their area, circularity, or other characteristics. You can find the relevant documentation here:
You may also try edge detection for identifying the boundaries of the bubbles and then apply morphological operations to refine the edges.
You may also find below MATLAB Answers relevant to your query:
I hope this helps!