/
CS448f: Image Processing For Photography and Vision CS448f: Image Processing For Photography and Vision

CS448f: Image Processing For Photography and Vision - PowerPoint Presentation

kittie-lecroy
kittie-lecroy . @kittie-lecroy
Follow
401 views
Uploaded On 2015-10-29

CS448f: Image Processing For Photography and Vision - PPT Presentation

Denoising How goes the assignment The course so far We have a fair idea what image processing code looks like We know how to treat an image as a continuous function We know how to warp images ID: 175807

bilateral pixel distribution filter pixel bilateral filter distribution nearby median blur gaussian average method local noise means add neighbors

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "CS448f: Image Processing For Photography..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

CS448f: Image Processing For Photography and Vision

DenoisingSlide2

How goes the assignment?Slide3

The course so far…

We have a fair idea what image processing code looks like

We know how to treat an image as a continuous function

We know how to warp images

What should we do next?Slide4

What are the big problems in Photography and Computer Vision, and how can Image Processing help?Slide5

Today: DenoisingSlide6

How do we know a pixel is bad?

It’s not like its neighbours

Solution: Replace each pixel with the average of its neighbors

I.e. Convolve by

1

1

1

1

1

1

1

1

1Slide7

3x3 Rect FilterSlide8

5x5 Rect FilterSlide9

Linear Filters

Why should a far-away pixel contribute the same amount as a nearby pixel

Gaussian blur:Slide10

Gaussian BlurSlide11

beta = 2Slide12

beta = 5Slide13

It’s radially symettric and separable at the same time:

Its Fourier transform is also a Gaussian

It’s not very useful for denoising

Some neat properties:Slide14

Linear Filters

Convolve by some kernel

Equivalent to multiplication in Fourier domain

Reduces high frequencies

But we wanted those - that’s what made the image sharp!

You don’t always need the high frequencies. The first step in many computer vision algorithms is a hefty blur.Slide15

Probabilistically...

What is the most probable value of a pixel, given its neighbors?Slide16

Probabilistically...

This is supposed to be dark grey:Slide17

Let’s ignore color for nowSlide18

And inspect the distributionSlide19

And inspect the distribution

Most probable pixel valueSlide20

And inspect the distribution

mean = mode = medianSlide21

DenoisingSlide22

DenoisingSlide23

The distributionSlide24

The distribution

The background

The textSlide25

The distribution

The meanSlide26

The distribution

The modeSlide27

The distribution

The medianSlide28

Median Filters

Replace each pixel with the median of its neighbours

Great for getting rid of salt-and-pepper noise

Removes small detailsSlide29

Before:Slide30

Gaussian Blur:Slide31

After Median Filter:Slide32

The distribution

What is the most probable pixel value?Slide33

It depends on your current value

The answer should vary for each pixelSlide34

An extra prior

Method 1) Convolution

The pixel is probably looking at the same material as all of its neighbors, so we’ll set it to the average of its neighbors.

Method 2) Bilateral

The pixel is probably looking at the same material as SOME of its neighbors, so we’ll set it to the average of those neighbors only.Slide35

The Bilateral Filter

How do we select good neighbours?

The ones with roughly similar brightnesses are probably looking at the same material.Slide36

Before:Slide37

Gaussian Blur:Slide38

After Median Filter:Slide39

After Bilateral:Slide40

Dealing with Color

It turns out humans are only sensitive to high frequencies in brightness

not in hue or saturation

So we can blur in chrominance much more than luminanceSlide41

Chroma Blurring

1) Convert RGB to LAB

L is luminance, AB are chrominance

(hue and saturation)

2) Perform a small bilateral in L

3) Perform a large bilateral in AB

4) Convert back to RGBSlide42

Before:Slide43

After Regular Bilateral:Slide44

After Modified Bilateral:Slide45

Method Noise (Gaussian)Slide46

Method Noise (Bilateral)Slide47

Leveraging Similarity:Non-Local MeansSlide48

What color should this pixel be?Slide49

What color should this pixel be?Slide50

Gaussian Blur:

A weighted average of these:

(all nearby pixels)Slide51

Bilateral filter

A weighted average of these:

(the nearby ones that have a similar color to me)Slide52

Non-Local Means

A weighted average of these:

(the ones that have similar neighbors to me)Slide53

Non-Local Means:

For each pixel

Find every other (nearby) pixel that has a similar local neighborhood around it to me

Set my value to be the weighted average of thoseSlide54

Before:Slide55

Gaussian Blur:Slide56

After Median Filter:Slide57

After Bilateral:Slide58

After Non-Local Means:Slide59

Before:Slide60

Method Noise (Gaussian)Slide61

Method Noise (Bilateral)Slide62

Method Noise (Non-Local Means)Slide63

Run-Times: Rect Filter

For every pixel:

For every other nearby pixel:

Do a multiply and addSlide64

Run-Times: Gaussian Blur

For every pixel:

For every other nearby pixel:

Compute a distance-based weight

(can be precomputed)

Do a multiply and addSlide65

Run-Times: Median Filter

For every pixel:

For every other nearby pixel:

Add into a histogram

Compute the median of the histogramSlide66

Run-Times: Bilateral

For every pixel:

For every other nearby pixel:

Compute a similarity weight

Compute a distance-based weight

(can be precomputed)

Do a multiply and addSlide67

Run-Times: Non-Local Means

For every pixel x:

For every other nearby pixel y:

Compute a distance weight

Compute a similarity weight:

For every pixel z in a patch around y

Compare z to the corresponding pixel in the patch around x

Add to the similarity term

Multiply and addSlide68

These methods are all fairly useless for large filter sizes

... unless you can speed them up