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.
Best Answer