This segmentation method is designed to be applied to algae images in a non-rod shape group that we
have to preserve spines or flagellums. Thus, we skip a smoothing process and start the algorithm with
Sobel edge detection on a grayscale image. The resulting gradient magnitude image is then put to the
Canny edge detection to produce an edge image. The edge image is a binary image where the 1 pixels
indicate edge pixels and the 0 pixels indicate non-edge pixels. In the Canny edge detection [2] process,
we use a small value of smoothing parameter, namely,
√
2 in order to preserve as much as possible edges
of algae body. At this step, the area inside the algae body may possibly be full of holes and the algae
boundary is not always connected. We fix this by applying morphological operators to the edge image.
Gaps along the algae boundary are filled by using a dilation operator with a bar-shaped structuring
element (SE) of size 2 pixels. The operation is performed in both vertical and horizontal directions.
After the boundary of algae are connected, a hole-filling operator [16] is performed in order to fill holes
in the algae body. The final step is to erode the shape of algae body back to its original size by using
an erosion operator with a bar-shaped SE of size 2 pixels in both vertical and horizontal directions (The
shape of algae body has been dilated in the process of filling gaps along the algae boundary).
In practice, algae images are often polluted by unwanted objects or illumination artefacts. It is
general that segmentation results obtained from the above steps usually contain isolated pixels/regions
around a shape and a background. Therefore, a postprocessing process usually needs to be performed
to eliminate those isolated pixels and small regions from a segmentation result. This can be done by ap-
plying morphological erosion with a diamond-shaped SE of size 3 × 3 pixels. The operator is performed
in both vertical and horizontal directions. An example of image segmentation using a single-resolution
edge detection method is shown in Figure 2.