Skip to content

Bit Plane Slicing

Jeet edited this page Jul 26, 2022 · 1 revision

We set the given number of least significant bits to zero with this method.

Command Line

Original image:

Original Image

2 bits:

$loomis -command bitplane_slicing -bits 2 testdata/green-bee-eater-grayscale.jpg

2 bits

4 bits:

$loomis -command bitplane_slicing -bits 4 testdata/green-bee-eater-grayscale.jpg

4 bits

7 bits:

$loomis -command bitplane_slicing -bits 7 testdata/green-bee-eater-grayscale.jpg

7 bits

Library Usage

newImage := pkg.BitPlaneSlicing(img, numberOfBits)

image is of type image.Image
numberOfBits is a number between 1 and 7 representing number of bits

Clone this wiki locally