Total Pageviews

Wednesday, December 2, 2026

Bit Plane Coding (Bit Plane Slicing)

BIT PLANE CODING

Bit Plane Slicing and Image Compression

Digital Image Processing

Image Decomposition Binary Images Image Compression

1. Introduction to Bit Plane Coding

Bit Plane Coding is a technique used in Digital Image Processing to reduce image data by separating an image into individual binary bit planes and processing each plane separately.

A digital grayscale image generally contains 8 bits per pixel. Therefore, each pixel can represent an intensity value from 0 to 255.

Each 8-bit pixel can be decomposed into eight individual 1-bit planes. Each plane represents one particular bit position of every pixel in the image.

The higher-order bit planes contain most of the visually significant image information, whereas the lower-order bit planes generally contain finer intensity variations and subtle details.

Important Concept: An 8-bit grayscale image can be divided into eight binary images. These binary images can then be compressed individually using suitable binary coding techniques.

Characteristics

  • It is based on binary representation of pixel values.
  • An 8-bit image produces eight bit planes.
  • Each bit plane is a binary image.
  • Higher-order planes generally contain more visual information.
  • Individual planes can be processed and compressed separately.

2. Basic Concept of Bit Plane Decomposition

Suppose a grayscale image has 8 bits per pixel. Every pixel intensity can be represented in binary form.

8-bit pixel = b7b6b5b4 b3b2b1b0

The eight bits are separated into eight different planes.

Bit Plane Bit Position Weight Description
Plane 7MSB128Highest significance
Plane 6Bit 664High significance
Plane 5Bit 532High significance
Plane 4Bit 416Medium significance
Plane 3Bit 38Lower significance
Plane 2Bit 24Lower significance
Plane 1Bit 12Low significance
Plane 0LSB1Lowest significance
MSB: Most Significant Bit (Bit 7).
LSB: Least Significant Bit (Bit 0).

3. Mathematical Representation

An image pixel intensity can be expressed using binary polynomial representation.

For an 8-bit pixel:

f(x,y) = b727 + b626 + b525 + b424 + b323 + b222 + b121 + b020

Where:

  • f(x,y) = Original pixel intensity.
  • bk = Binary value (0 or 1) at bit position k.
  • k = Bit position from 0 to 7.
  • 2k = Weight of the corresponding bit.

Bit Plane Extraction Formula

Bk(x,y) = ⌊ f(x,y) / 2k ⌋ MOD 2

This formula extracts the kth bit of a pixel. The result is always either 0 or 1.

Image Reconstruction Formula

f(x,y) = Σ Bk(x,y) × 2k
k = 0 to 7

The original pixel value is reconstructed by multiplying each bit plane by its corresponding weight and adding the results.

4. Numerical Example of Bit Plane Decomposition

Consider a pixel having intensity value:

f(x,y) = 220

Step 1: Convert Decimal to Binary

Divide the decimal number by 2 repeatedly and collect the remainders.

DivisionQuotientRemainder
220 ÷ 21100
110 ÷ 2550
55 ÷ 2271
27 ÷ 2131
13 ÷ 261
6 ÷ 230
3 ÷ 211
1 ÷ 201
220 = (11011100)2

Step 2: Identify Individual Bits

Bit Position Bit Value Weight Contribution
71128128
616464
50320
411616
3188
2144
1020
0010

Step 3: Calculate Original Intensity

220 = 128 + 64 + 16 + 8 + 4

Therefore, the pixel value is reconstructed from the eight individual bit values.

Step 4: Final Bit Plane Values

B7 = 1, B6 = 1, B5 = 0, B4 = 1
B3 = 1, B2 = 1, B1 = 0, B0 = 0

5. Bit Plane Decomposition of an Image Matrix

Consider the following 2 × 3 grayscale image matrix:

Original Image Matrix

22015075
45128255

Binary Representation

22015075
110111001001011001001011
45128255
001011011000000011111111

Bit Plane 7 (MSB)

110
011

Bit Plane 6

101
001

Bit Plane 5

000
101

Bit Plane 4

110
001

Bit Plane 3

101
101

Bit Plane 2

110
101

Bit Plane 1

011
001

Bit Plane 0 (LSB)

001
101
Each matrix represents one binary image. All eight matrices together contain the complete information of the original image.

6. Bit Plane Coding Algorithm

Encoding Algorithm

  1. Read the original grayscale image.
  2. Convert each pixel into its binary representation.
  3. Separate the binary representation into individual bit planes.
  4. Generate eight binary images for an 8-bit grayscale image.
  5. Process each binary image separately.
  6. Apply a suitable binary compression method, such as run-length coding or another binary coding technique.
  7. Store or transmit the compressed bit planes along with the necessary coding information.

Pseudocode for Bit Plane Encoding

BIT_PLANE_ENCODING(Image):

1. Read the input grayscale image.

2. FOR k = 0 TO 7:

      Create an empty binary plane.

      FOR every pixel (x,y):

          Bk(x,y) = floor(Image(x,y) / 2^k) MOD 2

      END FOR

      Compress the binary plane.

      Store the compressed plane.

3. END FOR

4. Store required image and coding information.

5. END

Decoding Algorithm

  1. Read the compressed bit-plane data.
  2. Decode each individual binary plane.
  3. Initialize the reconstructed image with zero values.
  4. Multiply each decoded plane by its corresponding bit weight.
  5. Add all weighted planes.
  6. Obtain the reconstructed grayscale image.

Pseudocode for Decoding

BIT_PLANE_DECODING():

1. Initialize reconstructed image = 0.

2. FOR k = 0 TO 7:

      Decode bit plane Bk.

      Reconstructed Image =
      Reconstructed Image + Bk * 2^k

3. END FOR

4. Display reconstructed image.

5. END

7. Bit Plane Coding Flowchart

Original Image ↓ Binary Conversion ↓ Bit Plane Decomposition ↓ Eight Binary Images ↓ Individual Compression ↓ Compressed Bit Planes

Reconstruction Flow

Compressed Data → Decode Planes → Apply Bit Weights → Add Planes → Reconstructed Image

8. Importance of Higher and Lower Bit Planes

Higher-Order Bit Planes

Bit planes 7, 6, 5 and 4 generally contain most of the visually significant information in a grayscale image. They contribute more heavily to the overall intensity and structure of the image.

Lower-Order Bit Planes

Bit planes 3, 2, 1 and 0 generally contain smaller intensity variations and subtle image details. The lowest bit plane contributes only 0 or 1 to the original pixel intensity.

Important: Lower-order planes are not always meaningless noise. They can contain important edges, textures or fine details. The actual information distribution depends on the image.

Reconstruction Using Selected Planes

Suppose we reconstruct an image using only the four highest-order planes (7, 6, 5 and 4).

Ireconstructed = 128B7 + 64B6 + 32B5 + 16B4

The reconstructed intensity is an approximation of the original image. The omitted lower-order planes contribute to the difference.

9. Applications of Bit Plane Coding

1. Digital Image Compression

The individual binary planes can be compressed separately to reduce the amount of data required for image storage.

2. Medical Image Processing

Bit-plane analysis can help study the contribution of different intensity bits in medical images.

3. Image Enhancement

Selected bit planes can be analyzed to understand important structures and intensity variations.

4. Image Analysis

Separating the bit planes helps study the significance of different binary components of image pixels.

5. Digital Watermarking

Selected bit planes, particularly lower-order planes, can be used in certain watermarking techniques.

6. Image Transmission

Bit-plane based progressive transmission can send important image information before less significant details.

10. Advantages of Bit Plane Coding

  • Separate Processing: Each binary plane can be processed independently.
  • Lossless Decomposition: Keeping all planes preserves the original pixel values exactly.
  • Information Analysis: Helps identify which bits contribute most to image appearance.
  • Flexible Compression: Different compression methods can be applied to different planes.
  • Progressive Reconstruction: Important planes can be transmitted first.
  • Reduced Data: Selected planes can be discarded when approximate reconstruction is acceptable.
  • Simple Mathematical Representation: Based on binary representation and powers of two.

11. Disadvantages of Bit Plane Coding

  • Multiple Planes: An 8-bit image produces eight separate binary images.
  • Processing Overhead: Every plane needs separate processing and management.
  • Variable Compression: Some binary planes may not compress effectively.
  • Loss of Information: Discarding planes causes loss of the corresponding pixel information.
  • Complexity: Additional coding and reconstruction procedures are required.
  • Image Dependency: Compression performance depends on the distribution of bits and spatial patterns.
  • Storage Overhead: Separate plane storage and metadata can add overhead.

12. Bit Plane Slicing vs Bit Plane Coding

Feature Bit Plane Slicing Bit Plane Coding
Meaning Separates an image into binary planes. Separates and compresses individual binary planes.
Main Purpose Image analysis and visualization. Image data compression.
Output Binary images. Compressed binary-plane data.
Compression Not necessarily performed. Compression is applied.
Reconstruction Combine all planes using weights. Decode planes and combine using weights.

13. Conclusion

Bit Plane Coding is an important technique in Digital Image Processing. It decomposes a multilevel image into a set of binary images and processes each plane individually.

The higher-order planes generally contain more visually significant information, while lower-order planes contribute to finer intensity details.

By compressing individual bit planes, it is possible to reduce image data and support progressive image transmission. It is also useful for image analysis and understanding the contribution of individual bits to the overall image.

14. Interactive Bit Plane Coding Tool

Upload a grayscale or colour image. This tool converts it to grayscale, extracts all eight bit planes and demonstrates image reconstruction using selected planes.

Instructions: Select an image from your computer. The tool will automatically display the original grayscale image and its eight individual bit planes.

Original Grayscale Image

Please upload an image.

Eight Individual Bit Planes

Image Reconstruction

Select the number of highest-order bit planes to use for reconstruction.

Using bit planes 7 through 0.

Learning observation: Using all eight planes gives an exact reconstruction. Using fewer planes produces an approximation because the omitted lower-order bits are not included.

15. References and Study Materials

The following references provide additional explanations of bit-plane decomposition, mathematical concepts and applications in Digital Image Processing.

📘 Reference 1: NPTEL – Bit Plane Slicing 📗 Reference 2: Digital Image Processing – Bit Plane Slicing Lecture Notes 📙 Reference 3: Digital Image Processing – Bit Plane Coding and Decomposition

No comments:

Post a Comment