130 likes | 152 Views
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. Internet concepts Applications Technology
E N D
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.
Internet concepts Applications Technology Implications for Internet skills Application development Content creation (images) Where does this topic fit?
Each pixel has a color Each color has a code
The image is 800 by 500 pixels Each pixel requires 4 bits.
1011 0000 1011 0000 1011 0101 0000 0101 Each pixel requires 4 bits How much memory or storage does the image require?
1-bit code 2-bit code 3-bit code 4-bit code A 00 B 01 C 10 D 11 A 0000 B 0001 C 0010 D 0011 E 0100 F 0101 G 0110 H 0111 I 1000 J 1001 K 1010 L 1011 M 1100 N 1101 O 1110 P 1111 A 0 B 1 A 000 B 001 C 010 D 011 E 100 F 101 G 110 H 111 More bits means more unique codes
Adding a bit doubles the number of codes 3-bit code 4-bit code A 0000 B 0001 C 0010 D 0011 E 0100 F 0101 G 0110 H 0111 I 1000 J 1001 K 1010 L 1011 M 1100 N 1101 O 1110 P 1111 A 000 B 001 C 010 D 011 E 100 F 101 G 110 H 111
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 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 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?