1

I have been studying quantization in the context of digital image processing. I referred to the 4th edition of the book titled Digital Image Processing by Rafael C. Gonzalez and Richard E. Woods.

In the book, the intensity quantization levels are defined as \$L=2^{k}\$ where k is an integer.

Why are the quantization levels an integer power of two? Why not just any integer in general?

This paragraph is taken from the book:

Book Paragraph

I proceeded to solve a homework problem, which I found online, using the concepts, and the problem as well as its solution are given below:

Ques

Solution

The bits per pixel (or bits per picture element) I believe are found using \$L=2^{n}\$, with n taking the place of the integer k as given in the book. n comes out to be 3.32 bits per pixel which is not an integer.

Isn't it a contradiction?

Shashank V M
  • 2,279
  • 13
  • 47
Anubhav
  • 61
  • 9
  • 4
    Numbers represented on binary computers are powers of 2. – user57037 Nov 06 '21 at 05:43
  • 2
    it's all correct. Quantization can have any integer number of levels. when calculating how many bits wide your digital value has to be and you obtain a fractional result, that means that 3 bits are not enough to express 10 levels, but 4 bits are. for your bandwidth calculation, you can continue with the fractional bit value because it doesn't matter how individual pixels would be encoded for the question. – tobalt Nov 06 '21 at 06:38
  • I believe the log in the last line is a log10 and not a log2. – tobalt Nov 06 '21 at 12:44

1 Answers1

4

It is a power of two because you are using digital hardware and each bit in a binary (base-2) number can only represent two states: ON/OFF, LO/HI, 0/1. It is exactly like how each digit in the decimal system (base-10) can represent ten different states, zero to nine. So a three digit binary number can represent 2^3 = 8 different combinations/states, while a three digit decimal number can represent 10^3 = 1000 combinations/states.

If you were using some other type of technology where the symbol could represent a different number of states then it would be a multiple of that.

There is not necessarily a contradiction because you specified that each element can represent 10 brightness levels which is not a power of two. Likely a physical limitation of the display hardware.

You're essentially not using the full capacity of the logical representation in the hardware so when you start coming up with metrics it won't fall into neat powers of two. Sort of like how each woman in a country might have 1.7 babies.

But you could also argue that you doing log2(10) is physically wrong because in reality you would need to use 4-bits worth of hardware to represent 10 states with the 6 remaining states being unused.

the busybee
  • 2,140
  • 8
  • 20
DKNguyen
  • 54,733
  • 4
  • 67
  • 153