Bit plane


A bit plane of a digital discrete signal is a set of bits corresponding to a given bit position in each of the binary numbers representing the signal.
For example, for 16-bit data representation there are 16 bit planes: the first bit plane contains the set of the most significant bit, and the 16th contains the least significant bit.
It is possible to see that the first bit plane gives the roughest but the most critical approximation of values of a medium, and the higher the number of the bit plane, the less is its contribution to the final stage. Thus, adding a bit plane gives a better approximation.
If a bit on the nth bit plane on an m-bit dataset is set to 1, it contributes a value of 2m−n, otherwise it contributes nothing. Therefore, bit planes can contribute half of the value of the previous bit plane. For example, in the 8-bit value 10110101 the bit planes work as follows:
Bit planeValueContributionCumulative total
1st11 × 27 = 128128
2nd00 × 26 = 0128
3rd11 × 25 = 32160
4th11 × 24 = 16176
5th00 × 23 = 0176
6th11 × 22 = 4180
7th00 × 21 = 0180
8th11 × 20 = 1181

Bit plane is sometimes used as synonymous to Bitmap; however, technically the former refers to the location of the data in memory and the latter to the data itself.
One aspect of using bit-planes is determining whether a bit-plane is random noise or contains significant information.
One method for calculating this is compare each pixel to three adjacent pixels, and. If the pixel is the same as at least two of the three adjacent pixels, it is not noise. A noisy bit-plane will have 49% to 51% pixels that are noise.

Applications

Media file formats

As an example, in PCM sound encoding the first bit in the sample denotes the sign of the function, or in other words defines the half of the whole amplitude values range, and the last bit defines the precise value. Replacement of more significant bits result in more distortion than replacement of less significant bits. In lossy media compression that uses bit-planes it gives more freedom to encode less significant bit-planes and it is more critical to preserve the more significant ones.
As illustrated in the image above, the early bitplanes, particularly the first, may have constant runs of bits, and thus can be efficiently encoded by run-length encoding. This is done in the Progressive Graphics File image format, for instance.

Bitmap displays

Some computers displayed graphics in bit-plane format, most notably PC with EGA graphics card, the Amiga and Atari ST, contrasting with the more common packed format. This allowed certain classes of image manipulation to be performed using bitwise operations, and parallax scrolling effects.

Video motion estimation

Some motion estimation algorithms can be performed using bit planes. This can sometimes provide a good enough approximation for correlation operations with minimal computational cost. This relies on an observation that the spatial information is more significant than the actual values. Convolutions may be reduced to bit shift and popcount operations, or performed in dedicated hardware.

Neural nets

Bitplane formats may be used for passing images to Spiking neural networks, or low precision approximations to neural networks/convolutional neural networks.

Programs

Many image processing packages can split an image into bit-planes. Open source tools such as Pamarith from Netpbm and Convert from ImageMagick can be used to generate bit-planes.