This example shows the segmentation of filarioses transmiter from a microscopic image (figure 1).
fig. 1 - Filarioses transmiters
Our first subgoal is to separate parts of the image that seems to holes. In order to achieve this we apply a morphological filter in the image. This filtering is done throught a closing by reconstruction (figure 2),
fig. 2 - Closing by Reconstruction
followed by a morphological subtraction of figure 1 from figure 2 (figure 3).
fig. 3 - Subtracion
Then we apply a thresholding, whose result is shown in figure 4.
fig. 4 - Thresholding
Now, our goal is to distinguish the filarioses from the other objects. We could perform that by using the fact that the filarioses are longer than the other objects. So our goal is to find markers for the longest objects of the binary image. We apply a skeleton by thinning on the image shown in figure 4 (figure 5),
fig. 5 - Skeletonization
followed by the N-Thinning(figure 6).
fig. 6 - N-Thinning
The tails of this image could be the markers that we want. In order to get them, we apply a skeleton that shaves the image of figure 6 (figure 7)
fig. 7 - Skeletonization
and subtract the image of figure 7 from the image of figure 6 (figure 8).
fig. 8 - Subtraction
To finish the work we have only to reconstruct the filarioses from the tails. This is done by using the reconstruction by opening and the result is shown in figure 9.
fig. 9 - Opening by Reconstruction
Figure 10 shows the combined images of the extracted filarioses and the original image.
fig. 10 - Combined images
Executing the cantata workspace fila.wk