Balloon-based image segmentationΒΆ

A balloon (a.k.a. active contour or snake) is a region-growing method useful to segment objects with bright boundaries. Briefly, a balloon begins as a small polygon (or even a point) defined inside the object to be segmented. The polygon grows under the influence of an inflation force, while trying to minimize an energy functional that depends on the value of the underlying pixels and the shape of the polygon. The energy of the balloon is minimized over bright pixels and when the shape is smooth and convex. To use a balloon in PyJAMAS:

  1. Make sure that the objects to be segmented in your image have bright boundaries (Invert image and Gradient under the Image menu can be useful for this).

  2. Activate the balloon mode using the Balloon option from the Annotations menu.

  3. Click the mouse inside the object to be segmented. Maintain the mouse pressed to increase the inflation force (you will see the force value in the status bar below your image).

  4. Release the mouse:

    • if the object is properly segmented, you are done;

    • if no segmentation appears, you need a stronger inflation force, try again;

    • if the segmentation is not correct, you can delete it by right clicking on it, or you can inflate it by clicking inside.

  5. If you would like to use the same inflation force for other objects, click inside the next object and release the mouse while pressing Shift. This will automatically apply the last recorded inflation force to the new balloon.