Binary |
Binary operations can be performed exclusively on binary images. In binary images, white regions represent the foreground (pixels in 8 pixel connectivity) and black regions the background (pixels in 4 pixel connectivity).
Pixel connectivity:
Connectivity defines which pixels are connected to other pixels to form a region (e.g. object, hole).
4-connected: only along the horizontal and the vertical direction. |
|
8-connected: in all directions (including diagonal direction). |
Fill the holes of objects (white regions). The background and the holes are characterized by black pixels in 4 pixel connectivity. Holes are defined as black regions, which are not connected to an image border.
Remove all the objects (white regions) that are connected to an image border.
Each white pixel is converted to a gray value that represents the distance from the nearest black pixel. Therefore, the resulting image is a grayscale image.
Note: When the white regions are small, the resulting image seems to be completely black. Use the Automatic levels operation to stretch the gray levels distribution.
Binary reconstruction allows selecting some white regions using a second binary image. The second image (source 2) contains markers (white regions). The reconstruction selects all the white regions in the source 1 image that are connected at least to one marker or a part of it (to create binary image of markers, see Markers).
Converts a binary image to a grayscale image (see Image Types).
Converts a binary image to a color image (RGB) (see Image Types).
See also: