CS 100 M Lecture 20 - 20. Working with Image Files imread,...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
20. Working with Image Files imread, imwrite, imshow, image, uint8, rgb2gray
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Pictures as Arrays A black and white picture can be encoded as a 2D Array Typical: 0 <= A(i,j) <= 255 (black) (white) Values in between correspond to different levels of grayness.
Background image of page 2
318-by-250 49 55 58 59 57 53 60 67 71 72 72 70 102 108 111 111 112 112 157 167 169 167 165 164 196 205 208 207 205 205 199 208 212 214 213 216 190 192 193 195 195 197 174 169 165 163 162 161 Just a Bunch of Numbers
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A Color Picture is 3 Arrays Stack them in a 3D array. Typical: 0 <= A(i,j,1) <= 255 (red) 0 <= A(i,j,2) <= 255 (green) 0 <= A(i,j,3) <= 255 (blue) Note 3 rd Subscript
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Encoding Images There are a number of file formats for images. Some common ones: JPEG (Joint Photographic Experts Group) GIF (Graphics Interchange Format) Behind the scenes: compressing data
Background image of page 6
1 2 3 4 5 6 7 8 9 2 4 6 8 10 12 14 16 18 3 6 9 12 15 18 21 24 27 4 8 12 16 20 24 28 32 36 5 10 15 20 25 30 35 40 45 6 12 18 24 30 36 42 48 54 7 14 21 28 35 42 49 56 63 8 16 24 32 40 48 56 64 72 9 18 27 36 45 54 63
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/23/2008 for the course CS 100 taught by Professor Fan/vanloan during the Spring '07 term at Cornell University (Engineering School).

Page1 / 37

CS 100 M Lecture 20 - 20. Working with Image Files imread,...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online