  We develop an automatic bubble-recognition routine based on Minkowski
functionals (MF) and tensors (MT) to detect bubble-like interstellar structures
in optical emission line images. Minkowski functionals and MT are powerful
mathematical tools for parameterizing the shapes of bodies. Using the
papaya2-library, we created maps of the desired MF or MT of structures at a
given window size. We used maps of the irreducible MT $\psi_2$, which is
sensitive to elongation, to find filamentary regions in H$\alpha$, [SII], and
[OIII] images of the Magellanic Cloud Emission Line Survey (MCELS). Using the
phase of $\psi_2$, we were able to draw lines perpendicular to each filament
and thus obtain line-density maps. This allowed us to find the center of a
bubble-like structure and to detect structures at different window sizes. The
detected bubbles in all bands are spatially correlated to the distribution of
massive stars, showing that we indeed detect interstellar bubbles without large
spatial bias. Eighteen out of 59 supernova remnants in the Large Magellanic
Cloud (LMC) and 13 out of 20 superbubbles are detected in at least one
wavelength. The lack of detection is mostly due to surrounding emission that
disturbs the detection, a too small size, or the lack of a (circular)
counterpart in our emission line images. In line-density maps at larger scales,
maxima can be found in regions with high star formation in the past, often
inside supergiant shells (SGS). In SGS LMC 2, there is a maximum west of the
shell where a collision of large gas clouds is thought to have occurred. In the
Small Magellanic Cloud (SMC), bubble detection is impaired by the more complex
projected structure of the galaxy. Line maps at large scales show large
filaments in the SMC in a north-south direction, especially in the [SII] image.
The origin of these filaments is unknown.
