
A binary image is a
digital image
A digital image is an image composed of picture elements, also known as pixels, each with '' finite'', '' discrete quantities'' of numeric representation for its intensity or gray level that is an output from its two-dimensional functions f ...
that consists of
pixels
In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest addressable element in a dot matrix display device. In most digital display devices, pixels are the sma ...
that can have one of exactly two colors, usually black and white. Each pixel is stored as a single
bit
The bit is the most basic unit of information in computing and digital communication. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented as ...
— i.e. either a 0 or 1.
A binary image can be stored in memory as a
bitmap
In computing, a bitmap (also called raster) graphic is an image formed from rows of different colored pixels. A GIF is an example of a graphics image file that uses a bitmap.
As a noun, the term "bitmap" is very often used to refer to a partic ...
: 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
Digital image processing is the use of a digital computer to process digital images through an algorithm. As a subcategory or field of digital signal processing, digital image processing has many advantages over analog image processing. It allo ...
and
pixel art. Binary images can be interpreted as
subset
In mathematics, a Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they a ...
s of the
two-dimensional integer lattice ''Z''
2; the field of
morphological image processing was largely inspired by this view.
Terminology
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
A monochrome or monochromatic image, object or palette is composed of one color (or values of one color). Images using only shades of grey are called grayscale (typically digital) or black-and-white (typically analog). In physics, mon ...
'' or ''monochromatic'' are often used, but can also designate other image types with only one sample per pixel, such as
grayscale images. In
Photoshop
Adobe Photoshop is a raster graphics editor developed and published by Adobe for Windows and macOS. It was created in 1987 by Thomas and John Knoll. It is the most used tool for professional digital art, especially in raster graphics editin ...
parlance, a binary image is the same as an image in "Bitmap" color mode.
Operations on binary images
An entire class of operations on binary images operates on a 3×3 window of the image. This contains nine pixels, so 2
9 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
The Game of Life, also known as Conway's Game of Life or simply Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial ...
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
Erosion is the action of surface processes (such as Surface runoff, water flow or wind) that removes soil, Rock (geology), rock, or dissolved material from one location on the Earth's crust#Crust, Earth's crust and then sediment transport, tran ...
(any unset pixels within the structuring element cause the pixel to be unset) and
dilation
wiktionary:dilation, Dilation (or dilatation) may refer to:
Physiology or medicine
* Cervical dilation, the widening of the cervix in childbirth, miscarriage etc.
* Coronary dilation, or coronary reflex
* Dilation and curettage, the opening of ...
(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
In mathematics, a Voronoi diagram is a partition of a plane into regions close to each of a given set of objects. It can be classified also as a tessellation. In the simplest case, these objects are just finitely many points in the plane (calle ...
, 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
Leonhard Euler ( ; ; ; 15 April 170718 September 1783) was a Swiss polymath who was active as a mathematician, physicist, astronomer, logician, geographer, and engineer. He founded the studies of graph theory and topology and made influential ...
, the perimeter, the area, the compactness, the area of holes, the minimum radius, the maximum radius.
Image segmentation
Binary images are produced from color images by
segmentation. Segmentation is the process of assigning each pixel in the source image to two or more classes. If there are more than two classes then the usual result is several binary images. The simplest form of segmentation is probably
Otsu's method which assigns pixels to foreground or background based on grayscale intensity. Another method is the
watershed algorithm.
Edge detection
Edge or EDGE may refer to:
Technology Computing
* Edge computing, a network load-balancing system
* Edge device, an entry point to a computer network
* Adobe Edge, a graphical development application
* Microsoft Edge, a web browser developed b ...
also often creates a binary image with some pixels assigned to edge pixels, and is also a first step in further segmentation.
Skeletons
Thinning or
skeletonization produces binary images which consist of pixel-wide lines. The branchpoints and endpoints can then be extracted, and the image converted to a graph. This is important in image recognition, for example in
optical character recognition
Optical character recognition or optical character reader (OCR) is the electronics, electronic or machine, mechanical conversion of images of typed, handwritten or printed text into machine-encoded text, whether from a scanned document, a photo ...
.
Interpretation
The interpretation of the pixel's binary value is also device-dependent. Some systems interprets the bit value of 0 as black and 1 as white, while others reversed the meaning of the values. In the
TWAIN standard PC interface for
scanners
''Scanners'' is a 1981 Canadian science fiction horror film written and directed by David Cronenberg and starring Stephen Lack, Jennifer O'Neill, Michael Ironside, and Patrick McGoohan. In the film, "scanners" are psychics with unusual telep ...
and
digital camera
A digital camera, also called a digicam, is a camera that captures photographs in Digital data storage, digital memory. Most cameras produced today are digital, largely replacing those that capture images on photographic film or film stock. Dig ...
s, the first flavor is called ''
vanilla
Vanilla is a spice derived from orchids of the genus ''Vanilla (genus), Vanilla'', primarily obtained from pods of the flat-leaved vanilla (''Vanilla planifolia, V. planifolia'').
''Vanilla'' is not Autogamy, autogamous, so pollination ...
'' and the reversed one ''chocolate''.
Dither
Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and video data, and is ofte ...
ing is often used for displaying
halftone
Halftone is the reprographic technique that simulates continuous tone, continuous-tone imagery through the use of dots, varying either in size or in spacing, thus generating a gradient-like effect.Campbell, Alastair. ''The Designer's Lexicon''. ...
images.
Usages
1-bit pixel art

Binary
pixelart, better known as ''1-Bit'' or ''1bit'' art, has been a method of displaying graphics since early computers. While
early computers such as the
ZX81
The ZX81 is a home computer that was produced by Sinclair Research and manufactured in Dundee, Scotland, by Timex Corporation. It was launched in the United Kingdom in March 1981 as the successor to Sinclair's ZX80 and designed to be a low-c ...
used the restriction as a necessity of the hardware, hand-held LCD games such as
Game & Watch
is a series of handheld electronic games developed by Nintendo. Designed by Gunpei Yokoi, the first game, ''Ball'' was released in 1980 and the original production run of the devices continued until 1991. The name Game & Watch reflects thei ...
and
Tamagotchi
is a brand of handheld digital pets that was created in Japan by Akihiro Yokoi of WiZ and Aki Maita of Bandai. It was released by Bandai on November 23, 1996 in Japan and in the United States on May 1, 1997, quickly becoming one of the bigge ...
, alongside early computers with a focus on graphic user interfaces like the
Macintosh
Mac is a brand of personal computers designed and marketed by Apple Inc., Apple since 1984. The name is short for Macintosh (its official name until 1999), a reference to the McIntosh (apple), McIntosh apple. The current product lineup inclu ...
made large steps in promoting the culture, technique and aesthetic of the restrictions of 1-bit art.
Modern examples of 1bit art are visible in indie videogames and other digital art. Best-seller games like ''
Gato Roboto'', ''
Return of the Obra Dinn'', ''
Minit'' and ''
World of Horror'' use 1bit as a style to give their games a retro feel or to simply save the graphic designers time in development. There is even new 1-Bit hardware in development, such as the experimental handheld console
Playdate.
For pixel artists, 1-Bit has become a common challenge for creating art. The pixelart contest ''Pixtogether'' required its participants to use only two colours for its 10th monthly contest. Not a lot of artists mainly do 1bit art, but many of them stay in contact with each other to exchange knowledge about working with the restriction, and hosting own collaborations.
Brandon James Greer, who makes popular YouTube tutorials on 1bit and other pixel artwork, says that "the restriction leads to some unique approaches" and that working in 1-Bit is "a very fun and unique challenge".
While 1bit can be called an
art style itself, each piece falls under a second style too. Obvious differences in 1bit art styles are for example whether, how much and what kind of
dithering is being used, the
image resolution
Image resolution is the level of detail of an image. The term applies to digital images, film images, and other types of images. "Higher resolution" means more image detail.
Image resolution can be measured in various ways. Resolution quantifies ...
, the use of
outlines
Outline or outlining may refer to:
* Outline (list), a document summary, in hierarchical list format
* Code folding, a method of hiding or collapsing code or text to see content in outline form
* Outline drawing, a sketch depicting the outer edge ...
and how detailed the artwork is.
Computer peripherals
Some input/output devices, such as
laser printer
Laser printing is an electrostatic digital printing process. It produces high-quality text and graphics (and moderate-quality photographs) by repeatedly passing a laser beam back and forth over a Electric charge, negatively charged cylinder call ...
s,
fax machines
Fax (short for facsimile), sometimes called telecopying or telefax (short for telefacsimile), is the telephone, telephonic transmission of scanned printed material (both text and images), normally to a telephone number connected to a printer or ...
, and bi-level
computer displays
A computer monitor is an output device that displays information in pictorial or textual form. A discrete monitor comprises a electronic visual display, visual display, support electronics, power supply, Housing (engineering), housing, electri ...
, can only handle binary images.
Early mobile computing and internet
In 1999, the
Wireless Application Protocol Forum
OMA SpecWorks, previously the Open Mobile Alliance (OMA), is a standards organization which develops open, international technical standards for the mobile phone industry. It is a nonprofit Non-governmental organization (NGO), not a formal govern ...
introduced the standard for the
.wbmp (wireless bitmap) file format as part of the standards for displaying
WAP pages.
Visual cryptography

In 1994,
Moni Naor
Moni Naor () is an Israeli computer scientist, currently a professor at the Weizmann Institute of Science. Naor received his Ph.D. in 1989 at the University of California, Berkeley. His advisor was Manuel Blum.
He works in various fields of com ...
and
Adi Shamir
Adi Shamir (; born July 6, 1952) is an Israeli cryptographer and inventor. He is a co-inventor of the Rivest–Shamir–Adleman (RSA) algorithm (along with Ron Rivest and Len Adleman), a co-inventor of the Feige–Fiat–Shamir identification sc ...
demonstrated a visual
secret sharing
Secret sharing (also called secret splitting) refers to methods for distributing a secrecy, secret among a group, in such a way that no individual holds any intelligible information about the secret, but when a sufficient number of individuals c ...
scheme, where a binary image was broken up into ''n'' shares so that only someone with all ''n'' shares could decrypt the image, while any shares revealed no information about the original image. Each share was printed on a separate transparency, and decryption was performed by overlaying the shares. When all ''n'' shares were overlaid, the original image would appear. There are several generalizations of the basic scheme including ''k''-out-of-''n'' visual cryptography, and using opaque sheets but illuminating them by multiple sets of identical illumination patterns under the recording of only one single-pixel detector.
Digital image editing
Binary images often arise in
digital image processing
Digital image processing is the use of a digital computer to process digital images through an algorithm. As a subcategory or field of digital signal processing, digital image processing has many advantages over analog image processing. It allo ...
of more complex images, in the form of
masks
A mask is an object normally worn on the face, typically for protection, disguise, performance, or entertainment, and often employed for rituals and rites. Masks have been used since antiquity for both ceremonial and practical purposes, ...
, as a result of
thresholding, and for use in
dither
Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and video data, and is ofte ...
ing.
Oversampled binary image sensors
An
oversampled binary image sensor is a digital
image sensor An image sensor or imager is a sensor that detects and conveys information used to form an image. It does so by converting the variable attenuation of light waves (as they refraction, pass through or reflection (physics), reflect off objects) into s ...
reminiscent of traditional photographic film. Each pixel in the sensor has a binary response, giving only a one-bit quantized measurement of the local light intensity.
See also
*
Black-and-white
Black-and-white (B&W or B/W) images combine black and white to produce a range of achromatic brightnesses of grey. It is also known as greyscale in technical settings.
Media
The history of various visual media began with black and white, ...
*
Dithering
*
Connected-component labeling
*
Discrete tomography
*
Netpbm format
Netpbm (formerly Pbmplus) is an open-source software, open-source package of graphics programs and a programming library. It is used primarily in Unix, where it is found in all major open-source operating system distributions, but also works on M ...
*
JBIG
JBIG is an early lossless image compression standard from the Joint Bi-level Image Experts Group, standardized as ISO/ IEC standard 11544 and as ITU-T recommendation T.82 in March 1993. It is widely implemented in fax machines. Now that the new ...
/
JBIG2
JBIG2 is an image compression standard for bi-level images, developed by the Joint Bi-level Image Experts Group. It is suitable for both lossless and lossy compression. According to a press release from the Group, in its lossless mode JBIG2 typ ...
*
X BitMap
*
X PixMap
*
Oversampled binary image sensor
References
{{reflist
External links
Monochrome Bitmaps
1
Image processing
Digital geometry
2 (number)