A binary image is an image whose pixels take only two values, typically 0 and 1
(but
So, we consider that the images contain objects (represented by white pixels) on a background (black pixels), as in Figure 1.

Figure 1:Example of a binary image composed of an object (a famous mouse head) on a background.
After a short section introducing the concepts of neighborhood and connectivity, the basic operators of mathematical morphology (dilation and erosion, and their combination opening and closing) are presented. Multiple tools have been created from these operators, we focus on four of these tools: top-hat transform granulometry hit-or-miss transform and skeleton. Finally, we deal with measuring the geometric characteristics of binary objects.