Search Header Logo
[igCS] Image Representation

[igCS] Image Representation

Assessment

Presentation

Computers

9th Grade

Practice Problem

Medium

Created by

Andy tsui

Used 11+ times

FREE Resource

17 Slides • 16 Questions

1

[igCS] Image Representation

by Andy tsui

2

​Revision Questions

​Get Notebook ready

3

Multiple Select

What are the two methods for representing negative integers?

1

Two's Complement

2

One's Complement

3

Sign and Magnitude

4

Random placement

4

Multiple Choice

Which one is more commonly used in computer?

1

Sign and magnitude

2

Two's Complement

5

Multiple Choice

1011 is a 4-bit two's complement binary number, it must be:

1

Positive

2

Negative

6

Multiple Choice

What is the value of 1011 (4-bt 2's complement)?

1

5

2

-5

3

3

4

-3

7

​Another method to convert from -ve binary...

8

Multiple Choice

What is the value of 1001 (4-bt 2's complement)?

1

7

2

-7

3

1

4

-1

9

Multiple Choice

What is the value of 1000 0011 (8-bt 2's complement)?

1

3

2

-3

3

-125

4

125

10

Multiple Select

Standard ASCII code is.... (choose all applies)

1

7-bit coding

2

Represents English Alphabets

3

Contains European accents

4

Including Non-printable characters

5

8-bit encoding

11

Fill in the Blank

What is the name of the text encoding that includes all characters from (almost) every language?

12

​Objectives

Understand how and why a computer represents an image, including the effects of the resolution and colour depth

13

​Computer image

  • ​Computer image is represented by grid of small "dots"

  • ​Those dots are called "Pixel" (stands for Picture Element)

  • Each pixel contains one single color

  • ​Pixels are organized in rectangular grid

media

14

Image Resolution

  • ​Resolution is defined by number of pixels in an image

  • Usually written as width x height

  • The higher resolution

    • => more pixels for an image

    • => better image quality (smoother)

media

15

Activity​

Black and White image​

​https://studio.code.org/s/csp1-2021/lessons/7/levels/2

16

Multiple Choice

What is the Resolution of the "A" you created?

1

3x5

2

8x8

3

2x6

4

10x10

17

Fill in the Blank

How many, in total, pixels in the "A" we created?

18

Color in Computer

  • ​All colors in computer is composed of 3 basic colors:

    • ​Red, Green and Blue

    Mixing the basic color results in different colors you can see

media

19

Activity​

​3-Bit Color

​https://studio.code.org/s/csp1-2021/lessons/8/levels/2

20

​Color Depth

  • Each pixel in an image contains one single color

  • ​The number of bits used in each color is called Color Depth

  • Higher Color Depth =>

    • ​More distinct colors can be displayed in a picture / screen

media

Color-depth compared on ​Grayscale only

21

​1-bit Color Depth

  • ​Black and White (only) image

    • ​Note it is different from the black and white in everyday life referring to

  • ​Each pixel contains 1 bit only

  • ​The total size (storage) of the image is:

    • width x height x 1 bits (color depth)

media
media

22

Multiple Choice

Question image

How many total pixels in the smiling face shown?

1

32

2

64

3

96

4

48

23

Fill in the Blank

Question image

Calculate the size of the image, in terms of number of bits

24

​8-bit Grayscale

  • We usually use 8-bit (or 1 byte) depth to store grayscale image (so called black and white photo)

  • The size of the image is given by:

    • ​width x height x 8 bits (color depth) ... or simply

    • width x height x 1 Bytes

media

25

Multiple Choice

Given an 8-bit grayscale image of 100 x 50 resolution, calculate the size of the image. 

1

5000 Bytes

2

4000 Bytes

3

5000 bits

4

1000 Bytes

26

Multiple Choice

Question image

How many different shades from white to gray to white, can be displayed in 8-bit grayscale? (in other word, how many distinct number can represented by 8-bit)

1

256

2

8

3

16

4

128

27

Activity​

​6-Bit Color

​https://studio.code.org/s/csp1-2021/lessons/8/levels/4

28

​8-Bit Color image

  • ​8 Bit Color depth can also use in colored image

  • Nowadays mainly used in Animated GIF format (gif only allows 8 bit)

  • ​Since there's only 256 distinct color, gif is not very good in displaying smooth shades like photo, but works better in illustrations

media
media

29

True Color (24-bit)

  • ​We use 8-bit per basic color for each pixel, which means:

    • ​8 x 3 = 24 bits

  • By adjusting the amount of each basic color, nearly ALL color can be displayed (more than 16 Million distinct colors)

  • In Website, we use

    • ​#RRGGBB format to define color

media

30

​More on 24-bit

  • Nowadays most of our photos are 24-bit

  • ​The storage size is given by:

    • ​width x height x 24 bits or..

    • ​width x height x 3 Bytes

media

31

Fill in the Blank

How many bits per pixel in a true color RGB image?

32

Multiple Choice

What is the size of the a 24-bit color depth, 100 x 50 pixel image?

1

15000 Bytes

2

15000 bits

3

5000 bits

4

5000 Bytes

33

​Conclusion

  • Image quality is defined by

    • ​Resolution, pixel count of the image

    • ​Color depth, number of bits to store distinct color value

  • ​Image file size is calculated by:

    • ​Width x Height x Color Depth

[igCS] Image Representation

by Andy tsui

Show answer

Auto Play

Slide 1 / 33

SLIDE