Skip to content

💡[Feature]: Bit plane slicing using OPEN CV & Matplot Lib #1577

@Suvadip-sana

Description

@Suvadip-sana

Is there an existing issue for this?

  • I have searched the existing issues

Feature Description

This code performs bit-plane slicing on an image, a technique that decomposes an image into its binary components. Here’s a step-by-step explanation:

Loading and Displaying the Image:
The image (baboon.tiff) is loaded in grayscale, then displayed with the title "Baboon."

Bit-Plane Slicing:
The code creates 8 separate "bit planes" for the image, where each plane corresponds to one bit of each pixel's intensity value.
Each bit plane is extracted by performing a bitwise AND operation between the image and (1 << i), which shifts a binary 1 to the i-th position (from the least significant to the most significant bit).
These bit planes are stored in the list bit.

Displaying Bit Planes:
The code then visualizes each of the 8 bit planes, from the least significant bit (plane 0) to the most significant bit (plane 7), using matplotlib's subplot functionality.

Use Case

Bit-plane slicing is used to analyze and process specific parts of an image’s information:

Image Compression: Less significant bit planes (lower bits) often contain noise or minor details and can be discarded in lossy compression methods to save space.
Image Analysis: The higher bit planes contain the most significant visual details. Analyzing these planes can be useful in applications like object recognition, where minor details are less important.
Watermarking and Steganography: Data can be hidden in the lower bit planes of an image, making it suitable for digital watermarking and steganography.

Benefits

@sanjay-kv Sir please Assign this to me. I want to add this under Open CV project.

Add ScreenShots

image
image

Priority

High

Record

  • I have read the Contributing Guidelines
  • I'm a GSSOC'24 contributor
  • I want to work on this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions