07/10: Novel Variants of the Bilateral Filter Jack Tumblin EECS, - - PowerPoint PPT Presentation

07 10 novel variants of the bilateral filter
SMART_READER_LITE
LIVE PREVIEW

07/10: Novel Variants of the Bilateral Filter Jack Tumblin EECS, - - PowerPoint PPT Presentation

A Gentle Introduction A Gentle Introduction to Bilateral Filtering to Bilateral Filtering and its Applications and its Applications 07/10: Novel Variants of the Bilateral Filter Jack Tumblin EECS, Northwestern University Review:


slide-1
SLIDE 1
slide-2
SLIDE 2

A Gentle Introduction to Bilateral Filtering and its Applications A Gentle Introduction to Bilateral Filtering and its Applications

07/10: Novel Variants

  • f the Bilateral Filter

Jack Tumblin – EECS, Northwestern University

slide-3
SLIDE 3

Review: Bilateral Filter Review: Bilateral Filter

A 2 A 2-

  • D filter window: weights vary with intensity

D filter window: weights vary with intensity

c c

s s

Domain Domain Range Range

f(x) f(x) x x 2 Gaussian Weights: 2 Gaussian Weights: product = product = ellisoidal ellisoidal footprint footprint

Normalize weights to Normalize weights to always sum to 1.0 always sum to 1.0

slide-4
SLIDE 4

Review: Bilateral Filter Review: Bilateral Filter

c c s s c c s s

Why it works: graceful segmentation Why it works: graceful segmentation

  • Smoothing for

Smoothing for ‘ ‘similar similar’ ’ parts parts ONLY ONLY

  • Range Gaussian

Range Gaussian s s acts as a acts as a ‘ ‘filtered region filtered region’ ’ finder finder

Domain Domain Range Range f(x) f(x)

x x

slide-5
SLIDE 5

Bilateral Filter Variants Bilateral Filter Variants

  • before the ‘Bilateral’ name :

– Yaroslavsky (1985): T.D.R.I.M. – Smith & Brady (1997): SUSAN

And now, a growing set of named variants:

  • ‘Trilateral’ Filter (Choudhury et al., EGSR 2003)
  • Cross-Bilateral (Petschnigg04, Eisemann04)
  • NL-Means (Buades 05)

And more coming: application driven…

slide-6
SLIDE 6

Who was first? Many Pioneers Who was first? Many Pioneers

  • Elegant, Simple, Broad Idea

‘Invented’ several times

  • Different Approaches, Increasing Clarity

– Tomasi & Manduchi(1998): ‘Bilateral Filter’ – Smith & Brady (1995): ‘SUSAN’

“Smallest Univalue Segment Assimilating Nucleus”

– Yaroslavsky(1985)

‘Transform Domain Image Restoration Methods’

slide-7
SLIDE 7

New Idea! New Idea! 1985 1985 Yaroslavsky Yaroslavsky: :

A 2 A 2-

  • D filter window:

D filter window: weights vary with intensity ONLY weights vary with intensity ONLY

c c

s s

Domain Domain Range Range

f(x) f(x) x x Square neighborhood, Square neighborhood, Gaussian Weighted Gaussian Weighted ‘ ‘similarity similarity’ ’

Normalize weights to Normalize weights to always sum to 1.0 always sum to 1.0

slide-8
SLIDE 8

New Idea! New Idea! 1995 Smith: 1995 Smith: ‘ ‘SUSAN SUSAN’ ’ Filter Filter

A 2 A 2-

  • D filter window: weights vary with intensity

D filter window: weights vary with intensity

c c

s s

Domain Domain Range Range

f(x) f(x) x x 2 Gaussian Weights: 2 Gaussian Weights: product = product = ellisoidal ellisoidal footprint footprint

Normalize weights to Normalize weights to always sum to 1.0 always sum to 1.0

slide-9
SLIDE 9

Background: Background: ‘ ‘Unilateral Unilateral’ ’ Filter Filter

e.g. traditional, linear, FIR filters e.g. traditional, linear, FIR filters Key Idea: Key Idea: Convolution Convolution

  • Output(x) = local weighted avg. of inputs.

Output(x) = local weighted avg. of inputs.

  • Weights vary within a

Weights vary within a ‘ ‘window window’ ’ of nearby x

  • f nearby x
  • Smoothes away details,

Smoothes away details, BUT BUT blurs result blurs result

c c

weight(x) weight(x) Note that weights Note that weights always sum to 1.0 always sum to 1.0

slide-10
SLIDE 10

Piecewise smooth result Piecewise smooth result

– – averages local small details, ignores outliers averages local small details, ignores outliers – – preserves steps, large preserves steps, large-

  • scale ramps, and curves,...

scale ramps, and curves,...

  • Equivalent to anisotropic diffusion and robust statistics

Equivalent to anisotropic diffusion and robust statistics

[Black98,Elad02,Durand02] [Black98,Elad02,Durand02]

  • Simple & Fast

Simple & Fast (esp. w/

(esp. w/ [Durand02]

[Durand02] FFT

FFT-

  • based speedup)

based speedup)

Bilateral Filter: Bilateral Filter: Strengths Strengths

c c s s

slide-11
SLIDE 11

Output at is Output at is average of a average of a tiny region tiny region

Bilateral Filter: Bilateral Filter: 3 Difficulties 3 Difficulties

  • Poor Smoothing in

Poor Smoothing in High Gradient Regions High Gradient Regions

  • Smoothes and blunts

Smoothes and blunts cliffs, valleys & ridges cliffs, valleys & ridges

  • Can combine disjoint

Can combine disjoint signal regions signal regions

c c s s

slide-12
SLIDE 12

Bilateral Filter: Bilateral Filter: 3 Difficulties 3 Difficulties

  • Poor Smoothing in

Poor Smoothing in High Gradient Regions High Gradient Regions

  • Smoothes and blunts

Smoothes and blunts cliffs, valleys & ridges cliffs, valleys & ridges

  • Can combine disjoint

Can combine disjoint signal regions signal regions

c s s

slide-13
SLIDE 13

‘ ‘Blunted Corners Blunted Corners’ ’ Weak Halos Weak Halos

Bilateral : Bilateral :

slide-14
SLIDE 14

‘ ‘Blunted Corners Blunted Corners’ ’ Weak Halos Weak Halos

‘ ‘Trilateral Trilateral’ ’: :

slide-15
SLIDE 15

Bilateral Filter: Bilateral Filter: 3 Difficulties 3 Difficulties

  • Poor Smoothing in

Poor Smoothing in High Gradient Regions High Gradient Regions

  • Smoothes and blunts

Smoothes and blunts cliffs, valleys & ridges cliffs, valleys & ridges

  • Disjoint regions

Disjoint regions can blend together can blend together

c s s

slide-16
SLIDE 16

New Idea! New Idea! Trilateral Filter ( Trilateral Filter (Choudhury Choudhury 2003) 2003)

Goal: Goal: Piecewise linear smoothing, not piecewise constant Piecewise linear smoothing, not piecewise constant Method: Method: Extensions to the Bilateral Filter Extensions to the Bilateral Filter

Position Position Intensity Intensity

EXAMPLE: EXAMPLE: remove noise from a piecewise linear remove noise from a piecewise linear scanline scanline

slide-17
SLIDE 17

Outline: Bilateral Outline: Bilateral Trilateral Filter Trilateral Filter

Three Key Ideas: Three Key Ideas:

  • Tilt

Tilt the filter window the filter window

according to bilaterally according to bilaterally-

  • smoothed gradients

smoothed gradients

  • Limit

Limit the filter window the filter window

to connected regions to connected regions

  • f similar smoothed gradient.
  • f similar smoothed gradient.
  • Adjust

Adjust Parameters Parameters

from measurements from measurements

  • f the windowed signal
  • f the windowed signal

c c s s

slide-18
SLIDE 18

Outline: Bilateral Outline: Bilateral Trilateral Filter Trilateral Filter

Key Ideas: Key Ideas:

  • Tilt

Tilt the filter window the filter window

according to bilaterally according to bilaterally-

  • smoothed gradients

smoothed gradients

  • Limit

Limit the filter window the filter window

to connected regions to connected regions

  • f similar smoothed gradient.
  • f similar smoothed gradient.
  • Adjust

Adjust Parameters Parameters

from measurements from measurements

  • f the windowed signal
  • f the windowed signal

c c s s

slide-19
SLIDE 19

Outline: Bilateral Outline: Bilateral Trilateral Filter Trilateral Filter

Key Ideas: Key Ideas:

  • Tilt

Tilt the filter window the filter window

according to bilaterally according to bilaterally-

  • smoothed gradients

smoothed gradients

  • Limit

Limit the filter window the filter window

to connected regions to connected regions

  • f similar smoothed gradient.
  • f similar smoothed gradient.
  • Adjust

Adjust Parameters Parameters

from measurements from measurements

  • f the windowed signal
  • f the windowed signal

c c s s

slide-20
SLIDE 20

Comparisons: Skylight Details Comparisons: Skylight Details

. .

Bilateral Bilateral

slide-21
SLIDE 21

Comparisons: Skylight Details Comparisons: Skylight Details

. .

Trilateral Trilateral

slide-22
SLIDE 22

. .

  • ,

,

slide-23
SLIDE 23

Trilateral Filter ( Trilateral Filter (Choudhury Choudhury 2003) 2003)

  • Strengths

Strengths

– – Sharpens Sharpens corners corners – – Smoothes similar Smoothes similar gradients gradients – – Automatic Automatic parameter parameter setting setting – – 3 3-

  • D

D mesh de mesh de-

  • noising

noising, too! , too!

  • Weaknesses

Weaknesses

– – S S-

  • L

L-

  • O

O-

  • W;

W; very costly connected very costly connected-

  • region finder

region finder – – Shares Shares Bilateral Bilateral’ ’s s ‘ ‘Single Single-

  • pixel region

pixel region’ ’ artifacts artifacts – – Noise Tolerance Noise Tolerance limits; disrupts limits; disrupts ‘ ‘tilt tilt’ ’ estimates estimates

slide-24
SLIDE 24

NEW IDEA : ‘Joint’ or ‘Cross’ Bilateral’ Petschnigg(2004) and Eisemann(2004) NEW IDEA : ‘Joint’ or ‘Cross’ Bilateral’ Petschnigg(2004) and Eisemann(2004)

Bilateral two kinds of weights NEW : get them from two kinds of images.

  • Smooth image A pixels locally, but
  • Limit to ‘similar regions’ of image B

Why do this?

To get ‘best of both images’

slide-25
SLIDE 25

Ordinary Bilateral Filter Ordinary Bilateral Filter

Bilateral two kinds of weights, one image A :

( )

( )

− − =

S

A A A G G W A BF

q q q p p p

q p | | || || 1 ] [

r s

σ σ

c c

s s

Image A:

Domain Domain Range Range

f(x) f(x) x x

slide-26
SLIDE 26

‘Joint’ or ‘Cross’ Bilateral Filter ‘Joint’ or ‘Cross’ Bilateral Filter

NEW: two kinds of weights, two images

( )

( )

− − =

S

A B B G G W A BF

q q q p p p

q p | | || || 1 ] [

r s

σ σ

c c

s s

A: Noisy, dim

(ambient image)

c c

s s

B: Clean,strong

(Flash image)

slide-27
SLIDE 27

Image A: Warm, shadows, but too Noisy

(too dim for a good quick photo)

Image A: Warm, shadows, but too Noisy

(too dim for a good quick photo) (too dim for a good quick photo)

No-flash

slide-28
SLIDE 28

Image B: Cold, Shadow-free, Clean

(flash: simple light, ALMOST no shadows)

Image B: Cold, Shadow-free, Clean

(flash: simple light, ALMOST no shadows) (flash: simple light, ALMOST no shadows)

slide-29
SLIDE 29

MERGE BEST OF BOTH: apply ‘Cross Bilateral’ or ‘Joint Bilateral’ MERGE BEST OF BOTH: apply ‘Cross Bilateral’ or ‘Joint Bilateral’

slide-30
SLIDE 30

(it really is much better!) (it really is much better!)

slide-31
SLIDE 31

Recovers Weak Signals Hidden by Noise Recovers Weak Signals Hidden by Noise

Noisy but Strong… Noisy and Weak… + Noise = + Noise =

slide-32
SLIDE 32

Ordinary Bilateral Filter? Ordinary Bilateral Filter?

Noisy but Strong… Noisy and Weak…

BF BF

Step feature GONE!! Step feature GONE!!

slide-33
SLIDE 33

Ordinary Bilateral Ordinary Bilateral

Noisy but Strong… Noisy and Weak…

Signal too small to reject Signal too small to reject Range filter preserves signal Range filter preserves signal

slide-34
SLIDE 34

‘Cross’ or ‘Joint’ Bilateral Idea: ‘Cross’ or ‘Joint’ Bilateral Idea:

Noisy but Strong… Noisy and Weak…

Range filter preserves signal Range filter preserves signal Use stronger signal Use stronger signal’ ’s range s range filter weights filter weights… …

slide-35
SLIDE 35

‘Joint’ or ‘Cross’ Bilateral Filter Petschnigg(2004) and Eisemann(2004) ‘Joint’ or ‘Cross’ Bilateral Filter Petschnigg(2004) and Eisemann(2004)

  • Useful Residues.

To transfer details,

– CBF(A,B) to remove A’s noisy details – CBF(B,A) to remove B’s clean details; – add to CBF(A,B) – clean, detailed image!

  • CBF(A,B): smoothes image A only;

(e.g. no flash)

  • Limits smoothing to stay within regions

where Image B is ~uniform (e.g. flash)

slide-36
SLIDE 36

New Idea: NL-Means Filter (Buades 2005) New Idea: NL-Means Filter (Buades 2005)

  • Same goals: ‘Smooth within Similar Regions’
  • KEY INSIGHT: Generalize, extend ‘Similarity’

– Bilateral:

Averages neighbors with similar intensities;

– NL-Means:

Averages neighbors with similar neighborhoods!

slide-37
SLIDE 37

NL-Means Method: Buades (2005) NL-Means Method: Buades (2005)

  • For each and

every pixel p:

slide-38
SLIDE 38

NL-Means Method: Buades (2005) NL-Means Method: Buades (2005)

  • For each and

every pixel p:

– Define a small, simple fixed size neighborhood;

slide-39
SLIDE 39

NL-Means Method: Buades (2005) NL-Means Method: Buades (2005)

  • For each and

every pixel p:

– Define a small, simple fixed size neighborhood; – Define vector Vp: a list of neighboring pixel values.

Vp =

0.74 0.32 0.41 0.55 … … …

slide-40
SLIDE 40

NL-Means Method: Buades (2005) NL-Means Method: Buades (2005)

‘Similar’ pixels p, q SMALL vector distance; || Vp – Vq ||2 p q

slide-41
SLIDE 41

NL-Means Method: Buades (2005) NL-Means Method: Buades (2005)

‘Dissimilar’ pixels p, q LARGE vector distance; || Vp – Vq ||2 p q q

slide-42
SLIDE 42

NL-Means Method: Buades (2005) NL-Means Method: Buades (2005)

‘Dissimilar’ pixels p, q LARGE vector distance; Filter with this! || Vp – Vq ||2 p q

slide-43
SLIDE 43

NL-Means Method: Buades (2005) NL-Means Method: Buades (2005)

p, q neighbors define a vector distance; Filter with this:

No spatial term!

|| Vp – Vq ||2 p q

( )

( )

− − =

S

I V V G G W I NLMF

q q q p p p

q p

2

|| || || || 1 ] [

r s

ρ ρ

σ σ

slide-44
SLIDE 44

NL-Means Method: Buades (2005) NL-Means Method: Buades (2005)

pixels p, q neighbors Set a vector distance;

Vector Distance to p sets weight for each pixel q

|| Vp – Vq ||2 p q

( )

− =

S

I V V G W I NLMF

q q q p p p 2

|| || 1 ] [

r

ρ ρ

σ

slide-45
SLIDE 45

NL-Means Filter (Buades 2005) NL-Means Filter (Buades 2005)

  • Noisy

source image:

slide-46
SLIDE 46

NL-Means Filter (Buades 2005) NL-Means Filter (Buades 2005)

  • Gaussian

Filter Low noise, Low detail

slide-47
SLIDE 47

NL-Means Filter (Buades 2005) NL-Means Filter (Buades 2005)

  • Anisotropic

Diffusion (Note ‘stairsteps’: ~ piecewise constant)

slide-48
SLIDE 48

NL-Means Filter (Buades 2005) NL-Means Filter (Buades 2005)

  • Bilateral

Filter (better, but similar ‘stairsteps’:

slide-49
SLIDE 49

NL-Means Filter (Buades 2005) NL-Means Filter (Buades 2005)

  • NL-Means:

Sharp, Low noise, Few artifacts.

slide-50
SLIDE 50

Many More Possibilities: EXPERIMENT! Many More Possibilities: EXPERIMENT!

  • Bilateral goals are subjective;

‘Local smoothing within similar regions’ ‘Edge-preserving smoothing’ ‘Separate large structure & fine detail’ ‘Eliminate outliers’ ‘Filter within edges, not across them’

  • It’s simplicity invites new inventive answers.
slide-51
SLIDE 51