CS 100 M Lecture 21 - 21. Working with Image Files Cont'd...

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

View Full Document Right Arrow Icon
21. Working with Image Files Cont’d Filtering Noise Edge Detection
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
1458-by-2084 150 149 152 153 152 155 151 150 153 154 153 156 153 151 155 156 155 158 154 153 156 157 156 159 156 154 158 159 158 161 157 156 159 160 159 162 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
1458-by-2084 150 149 152 153 152 155 151 150 153 154 153 156 153 2 3 156 155 158 154 2 1 157 156 159 156 154 158 159 158 161 157 156 159 160 159 162 Dirt! Note how the “dirty pixels” look out of place
Background image of page 4
Can We Filter Out the “Noise”?
Background image of page 5

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

View Full DocumentRight Arrow Icon
1458-by-2084 150 149 152 153 152 155 151 150 153 154 153 156 153 ? ? 156 155 158 154 ? ? 157 156 159 156 154 158 159 158 161 157 156 159 160 159 162 Idea Assign “typical” neighborhood gray values to “dirty pixels”
Background image of page 6
Getting Precise “Typical neighborhood gray values” Could use Median Or Mean radius 1 radius 3 We’ll look at “Median Filtering” first…
Background image of page 7

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

View Full DocumentRight Arrow Icon
Median Filtering Visit each pixel. Replace its gray value by the median of the gray values in the “neighborhood”.
Background image of page 8
Using a radius 1 “Neighborhood” 6 7 6 7 6 7 7 6 6 6 7 6 7 0 7 7 6 6 Before After 0 6 6 6 6 7 7 7 7
Background image of page 9

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

View Full DocumentRight Arrow Icon
m = 9 n = 18 for i=1:m for j=1:n Compute new gray value for pixel (i,j). end
Background image of page 10
Image of page 11
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 / 45

CS 100 M Lecture 21 - 21. Working with Image Files Cont'd...

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

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