A binary image is a digital image that has only two possible values for each pixel. Typically, the two colors used for a binary image are black and white. The color used for the object(s) in the image is the foreground color while the rest of the image is the background color. In the document-scanning industry, this is often referred to as "bi-tonal".
Binary images are also called bi-level or two-level. This means that each pixel is stored as a single bit—i.e., a 0 or 1. The names black-and-white, B&W, monochrome or monochromatic are often used for this concept, but may also designate any images that have only one sample per pixel, such as grayscale images. In Photoshop parlance, a binary image is the same as an image in "Bitmap" mode.
Binary images often arise in digital image processing as masks or as the result of certain operations such as segmentation, thresholding, and dithering. Some input/output devices, such as laser printers, fax machines, and bilevel computer displays, can only handle bilevel images.
A binary image can be stored in memory as a bitmap, a packed array of bits. A 640×480 image requires 37.5 KiB of storage. Because of the small size of the image files, fax machine and document management solutions usually use this format. Most binary images also compress well with simple run-length compression schemes.
Binary images can be interpreted as subsets of the two-dimensional integer lattice Z2; the field of morphological image processing was largely inspired by this view.
An entire class of operations 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 openingand 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.
Bitmap-, or raster [1] -, images are “digital photographs”, they are the most common form to represent natural images and other forms of graphics that are rich in detail. Bitmap images is how graphics is stored in the video memory of a computer. The term bitmap refers to how a given pattern of bits in a pixel maps to a specific color.
|
|
Note |
|
In the other chapters of introduction to image molding, raster images is the only topic. |
Figure 1.3. Raster image

A rasterized form of the letter 'a' magnified 16 times using pixel doubling
A bitmap images take the form of an array, where the value of each element, called a pixel picture element, correspond to the color of that portion of the image. Each horizontal line in the image is called a scan line.
The letter 'a' might be represented in a 12x14 matrix as depicted in Figure 3., the values in the matrix depict the brightness of the pixels (picture elements). Larger values correspond to brighter areas whilst lower values are darker.
When measuring the value for a pixel, one takes the average color of an area around the location of the pixel. A simplistic model is sampling a square, this is called a box filter, a more physically accurate measurement is to calculate a weighted Gaussian average (giving the value exactly at the pixel coordinates a high weight, and lower weight to the area around it). When perceiving a bitmap image the human eye should blend the pixel values together, recreating an illusion of the continuous image it represents.
The number of horizontal and vertical samples in the pixel grid is called Raster dimensions, it is specified as width x height.
Resolution is a measurement of sampling density, resolution of bitmap images give a relationship between pixel dimensions and physical dimensions. The most often used measurement is ppi, pixels per inch [2].
Figure 1.4. Sampling grid

A rasterized form of the letter 'a' magnified 16 times, where each pixel is represented as a circle instead of a square.
Скачано с www.znanio.ru
Материалы на данной страницы взяты из открытых источников либо размещены пользователем в соответствии с договором-офертой сайта. Вы можете сообщить о нарушении.