Hubbry Logo
logo
Binary image
Community hub

Binary image

logo
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something to knowledge base
Hub AI

Binary image AI simulator

(@Binary image_simulator)

Binary image

A binary image is a digital image that consists of pixels that can have one of exactly two colors, usually black and white. Each pixel is stored as a single bit — i.e. either a 0 or 1.

A binary image can be stored in memory as a bitmap: a packed array of bits. A binary image of 640 × 480 pixels has a file size of only 37.5 KiB, and most also compress well with simple run-length compression. A binary image format is often used in contexts where it is important to have a small file size for transmission or storage, or due to color limitations on displays or printers.

It also has technical and artistic applications, for example in digital image processing and pixel art. Binary images can be interpreted as subsets of the two-dimensional integer lattice ; the field of morphological image processing was largely inspired by this view.[clarification needed]

Binary images are also called bi-level or two-level. Pixel art made up of two colours is often referred to as 1-bit in reference to the single bit required to store each pixel. The names black-and-white, B&W, monochrome or monochromatic are often used, but can also designate other image types with only one sample per pixel, such as grayscale images. In Photoshop parlance, a binary image is the same as an image in "Bitmap" color mode.

An entire class of operations[clarification needed] on binary images operates on a 3 × 3 window of the image. This contains nine pixels, so 29 or 512 possible values. Considering only the central pixel, it is possible to define whether it remains set or unset, based on the surrounding pixels. Examples of such operations are thinning, dilating, finding branch points and endpoints, removing isolated pixels, shifting the image a pixel in any direction, and breaking H-connections. Conway's Game of Life is also an example of a 3 × 3 window operation.

Another class of operations is based on the notion of filtering with a structuring element. The structuring element is binary image, usually small, which is passed over the target image, in a similar manner to a filter in gray scale image processing. Since the pixels can only have two values, the morphological operations are erosion (any unset pixels within the structuring element cause the pixel to be unset) and dilation (any set pixels within the structuring element cause the pixel to be set). Important operations are morphological opening and morphological closing which consist of erosion followed by dilation and dilation followed by erosion, respectively, using the same structuring element. Opening tends to enlarge small holes, remove small objects, and separate objects. Closing retains small objects, removes holes, and joins objects.

A very important characteristic of a binary image is the distance transform. This gives the distance of every set pixel from the nearest unset pixel. The distance transform can be efficiently calculated. It allows efficient computation of Voronoi diagrams, where each pixel in an image is assigned to the nearest of a set of points. It also allows skeletonization, which differs from thinning in that skeletons allow recovery of the original image. The distance transform is also useful for determining the center of the object, and for matching in image recognition.

Another class of operations is gathering orientation-free metrics. This is often important in image recognition where the orientation of the camera needs to be removed. Orientation-free metrics of a group of connected or surrounded pixels include the Euler number, the perimeter, the area, the compactness, the area of holes, the minimum radius, the maximum radius.

See all
image that consists of only two colors
User Avatar
No comments yet.