Encoding images Skills none IT concepts an image

  • Slides: 13
Download presentation
Encoding images Skills: none IT concepts: an image representation code, the number of bits

Encoding images Skills: none IT concepts: an image representation code, the number of bits in a code, the amount of information in an image This work is licensed under a Creative Commons Attribution-Noncommercial. Share Alike 3. 0 License.

Where does this topic fit? • Internet concepts – Applications – Technology – Implications

Where does this topic fit? • Internet concepts – Applications – Technology – Implications for • Internet skills – Application development – Content creation (images)

Let’s encode this image

Let’s encode this image

Each pixel has a color Each color has a code

Each pixel has a color Each color has a code

12 colors, 12 codes

12 colors, 12 codes

The image is 800 by 500 pixels Each pixel requires 4 bits.

The image is 800 by 500 pixels Each pixel requires 4 bits.

Each pixel requires 4 bits 1011 0000 1011 0101 How much memory or storage

Each pixel requires 4 bits 1011 0000 1011 0101 How much memory or storage does the image require? 0101

Could we have more colors using a 4 -bit code?

Could we have more colors using a 4 -bit code?

More bits means more unique codes 1 -bit code A 0 B 1 2

More bits means more unique codes 1 -bit code A 0 B 1 2 -bit code A 00 B 01 C 10 D 11 3 -bit code A B C D E F G H 000 001 010 011 100 101 110 111 4 -bit code A B C D E F G H I J K L M N O P 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

Adding a bit doubles the number of codes 3 -bit code A B C

Adding a bit doubles the number of codes 3 -bit code A B C D E F G H 000 001 010 011 100 101 110 111 4 -bit code A B C D E F G H I J K L M N O P 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

The amount of information in an image Bits + a coding scheme → information

The amount of information in an image Bits + a coding scheme → information More pixels → more information More bits per pixel → more possible colors → more information

Encoding images Skills: none IT concepts: an image representation code, the number of bits

Encoding images Skills: none IT concepts: an image representation code, the number of bits in a code, the amount of information in an image This work is licensed under a Creative Commons Attribution-Noncommercial. Share Alike 3. 0 License.

A few questions An image is 800 by 500 pixels, and each pixel can

A few questions An image is 800 by 500 pixels, and each pixel can be one of 12 colors. How much memory would it require? An image is 800 by 500 pixels, and each pixel can be one of 256 colors. How much memory would it require? How many different colors could one represent using a 16 bit code? Can you write a formula to compute the number of unique codes possible given the number of bits in a code?