1 / 31

# Computing with Images - PowerPoint PPT Presentation

Computing with Images. Semester in Review. What is Computing with Images?. Image editing software Photoshop & GIMP & others PowerPoint Writing programs that manipulate images Python programming & JES 3D graphics and animation software Alice Web design Frontpage & HTML

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about ' Computing with Images' - paloma

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### Computing with Images

Semester in Review

• Image editing software

• Photoshop & GIMP & others

• PowerPoint

• Writing programs that manipulate images

• Python programming & JES

• 3D graphics and animation software

• Alice

• Web design

• Frontpage & HTML

• Video editing software

• Movie Maker & iMovie (on the Mac)

It isn’t really about the software we used...

It is really about the underlying science

It is really about the science of images!

• We have seen that programs represent pictures as grids of picture elements or pixels

Stephanos with his eraser collection

CSC 1040 - Computing with Images

Pixel encodings than

• RGB Color

• 3 colors: red, green, blue

• 8 bits/color

• 24 bits

• Bitmap

• 1 bit

• Grayscale

• 8 bits

CSC 1040 - Computing with Images

• Let’s walk it through.

• If we have one bit, we can represent two patterns: 0 and 1.

• If we have two bits, we can represent four patterns: 00, 01, 10, and 11.

• If we have three bits, we can represent eight patterns: 000, 001, 010, 011, 100, 101, 110, 111

CSC 1040 - Computing with Images

8 bits = 1 thanbyte

• General rule: In n bits, we can have 2n patterns

• In 8 bits, we can have 28 patterns, or 256

• If we make one pattern 0, then the highest value that we can represent is 28-1, or 255

CSC 1040 - Computing with Images

RGB than

• In RGB, each color has three component colors:

• Amount of redness

• Amount of greenness

• Amount of blueness

• In most computer-based models of RGB, a single byte (8 bits) is used for each

• So a complete RGB color is 24 bits, 8 bits of each

CSC 1040 - Computing with Images

y = 9 than

Position: (12,9)

x = 12

CSC 1040 - Computing with Images

red=108 than

green=86

blue=142

y = 9

Color:(108,86,142)

Position: (12,9)

x = 12

CSC 1040 - Computing with Images

Encoding RGB than

• Each component color (red, green, and blue) is encoded as a single byte

• Colors go from (0,0,0) to (255,255,255)

• If all three components are the same, the color is in greyscale

• (50,50,50) at (2,2)

• (0,0,0) (at position (1,2) in example) is black

• (255,255,255) is white

CSC 1040 - Computing with Images

Is that enough? than

• We’re representing color in 24 (3 * 8) bits.

• That’s 16,777,216 (224) possible colors

• Our eye can discern millions of colors, so it’s probably pretty close

• Some graphics systems support 32 bits per pixel

• May be more pixels for color, or an additional 8 bits to represent 256 levels of translucence

CSC 1040 - Computing with Images

Size of images than

CSC 1040 - Computing with Images

• Goal: reduce redundancy

• Send the same information using fewer bits

• Originally developed for fax transmission

• Send high quality documents in short calls

• Two basic strategies:

• Lossless: can reconstruct exactly

• Lossy: can’t reconstruct, but looks the same

CSC 1040 - Computing with Images

CSC 1040 - Computing with Images

Human Vision than

• Closely spaced dots appear solid

• But irregularities in diagonal lines can stand out

• High frame rates produce apparent motion

• Smooth motion requires about 24 frames/sec

• Visual acuity varies markedly across features

• Discontinuities easily seen, absolutes less crucial

CSC 1040 - Computing with Images

CSC 1040 - Computing with Images

... as these? than

CSC 1040 - Computing with Images

Not quite than

CSC 1040 - Computing with Images

• Opportunity:

• Large regions of a single color are common

• Approach:

• Record # of consecutive pixels for each color

• An example of lossless encoding

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

Uncompressed

000000000000000000000111111111111100000000000001111111111111111111111

RLE

Row 1, 21:0,13:1;13:0;22:1

LZW, etc. use algorithms in addition to RLE

01010101010101010101

CSC 1040 - Computing with Images

• Opportunity:

• No picture uses all 16 million colors

• Human eye does not see small differences

• Approach:

• Select a palette of 256 colors

• Indicate which palette entry to use for each pixel

• Look up each color in the palette

CSC 1040 - Computing with Images

• You also know...

• Video is just a series of images

• Animation is really just a series of images

• You also know...

• What Photoshop is doing when you use the magic wand to select or change the brightness or contrast or color levels

• What Photoshop is doing when you apply a filter of some sort or other

• It is all about the pixels... and you know what those are

• You also know...

• How “greenscreen” works in movie special effects

• You also know...

• How PowerPoint shows and animates stuff

• How Pixar makes its characters move

• How the world of Pandora was created in Avatar

• How Forrest Gump shakes hands with JFK

• How Hollywood special effects are created

• ...and when PowerPoint falls into the wrong hands

• This next slide is a real slide from a real presentation

• You also know...

• That it all comes down to the algorithms

• The algorithm is the set of steps used to do something, in the computer or in real life

• Everything, ultimately, is an algorithm... sometimes simple... sometimes very complex

• You also know...