Question
Write Python code to read an 8-bit picture and to create its corresponding 8 bit-planes. Every bit plan is a black and white picture (binary
Write Python code to read an 8-bit picture and to create its corresponding 8 bit-planes. Every bit plan is a black and white picture (binary image).
For examples: Choose a coloured image, it should be converted into a 8-bit picture called img8bit. Then, every pixel grey level is converted into binary (base 2) and digit_i is stored into bit plane_i. If I(1,1) = 131 = 1 0 0 0 0 0 1 1
Bitplane7(1,1) = 1 (the most significant bit) 2^7=128
Bitplane6(1,1) = 0
Bitplane5(1,1) = 0
Bitplane4(1,1) = 0
Bitplane3(1,1) = 0
Bitplane2(1,1) = 0
Bitplane1(1,1) = 1 2^1=2
Bitplane0(1,1) = 1 (the least significant bit) 2^0=1
Write Python code to create a 3-bits image by overlapping Bitplane 7, 6 and 5.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started