january 19, 2006computer vision © 2006 davi geigerlecture 1.1 image measurements and detection davi...

20
January 19, 200 6 Computer Vision © 2006 Davi Geiger Lecture 1.1 Image Measurements and Detection Davi Geiger [email protected]

Post on 19-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.1

Image Measurements and Detection

Davi Geiger

[email protected]

Page 2: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.2

Images are Intensity Surfaces andEdges are Intensity Discontinuities

I1(x, y)

I2(x, y)

Page 3: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.3

s

dIs

syxI0

sin,cos1

,,,~

1

0

sin,cos1

,,,~ s

i

yiyxixIs

syxI

                                                                                                                                                                                                                                                                                                

//4 /3

/6

/3 /

/

s=3 pixels

s=7 pixels

Discrete approximation

y

x

syxI ,,,~

on,AccumulatiIntensity :tsMeasuremen

97536

11,

4

7,

3

5,

2

3,

3

4,

4

5,

6

7,,

6

5,

4

3,

3

2,

2,

3,

4,

6,0

scales.different 4four at and directions 16sixteen alongintensity theofon accumulati theevaluate we,, pixeleach For

,,,s

yx

Page 4: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.4

1

0

)sin,cos(1

),,,(~ s

i

yiyxixIs

syxI                                                                                                                                                                                                                                                                                                   

//4 /3

/6

/3 /

/

, where

1

1

sin,cos1

1,

1,,,

~

1,,,

~ s

ic yiyxixI

syxI

sxyxI

s

ssyxI

Removing the center pixel: ),,,(~

syxIc

.35,34,32,3for3

2and1

613,67,65,6for1and3

247,45,43,4for2and2

23,,2,0for1and1

yx

yx

yx

yx

syxI ,,,~

on,AccumulatiIntensity :tsMeasuremen

Page 5: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

/4

s=3

s=5

/3

/6

s=5

s=3s=5

s=3

s=5

s=7s=7

s=7

s=7

s=3

syxIsyxIsyxIsyxI ,,,1~

,,1,~

,,1,~

,,,~

4

1

syxIsyxIsyxIsyxI ,,1,~

,,,1~

,,,1~

,,,~

4

1

syxIsyxIsyxIsyxI ,,1,1~

,,1,~

,,,1~

,,,~

4

1

),,,(ˆ syxI for

for

for

In order to obtain more robust measures, for an angle , we can average the value of along to obtain),,,(

~syxI ),,,(ˆ syxI

syxI ,,,ˆ II,on AccumulatiIntensity :tsMeasuremen

Page 6: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.6

.,,,ˆ,,,ˆ

sin,,,ˆ

cos,,,ˆ

sin,cos,,,ˆˆ,,,ˆ,,,ˆ

syxIsyxI

y

syxI

x

syxI

syxIsyxIsyxID

cc

Taking the derivative along the angle i.e., in a direction ,sin,cosˆ

Analogously, we obtain . We now have a bank of sixteen (16) distinct oriented filters at different scales, namely { ; and s .

syxID ,,,~

                               

                               

                             

                           

                               

                               

                           

                           

                               

                               

                             

                           

                               

                               

                               

                               

will have maximum response (highest value) among the possible orientations, while will have the minimum response.

),6,,(ˆ syxID

),32,,(ˆ syxID

/ 3 syxID ,,,ˆ

x

y

syxID ,,,ˆ s,Derivative :tsMeasuremen

Page 7: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.7

3,0,,ˆ yxID

3,6

,,ˆ yxID

3,4

,,ˆ yxID

3,3

,,ˆ yxID

128

64

16

0

-16

-64

-128

syxID ,,,ˆ :sExperiment

Page 8: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.8

3,2

,,ˆ yxID

3,3

2,,ˆ

yxID

3,4

3,,ˆ

yxID

3,6

5,,ˆ

yxID

255

128

32

0

-32

-128

-255

syxID ,,,ˆ :(cont.) sExperiment

Page 9: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.9

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

/3

/6

syxID

y

syxI

x

syxI

syxIsyxIsyxID

,2

,,ˆ

cos,,,ˆ

sin,,,ˆ

cos,sin,,,ˆˆ,,,ˆ,,,ˆ

Corners and Junctions will respond to high values of at distant locationsfrom the center.

syxID ,,,ˆ

syxIDsyxID ,23

,,ˆ,3

,,ˆ

syxIDsyxID ,26

,,ˆ,6

,,ˆ

The maximum responses here among the different are

and

x

y

syxID ,,,ˆ s,Derivative :tsMeasuremen

Page 10: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.10

yI

xyI

yxI

xI

yxH

2

22

2

2

2

ˆˆ

ˆˆ

,The Hessian allows for computing the second derivative.

Tvu uyxHvsyxID ˆ,ˆ,,,,ˆ

In order to compute the (second) derivative along the direction of a (first) derivative along a direction we compute the projectionsu

v

For example, for we obtain

and for we obtain

,ˆ0,1ˆ;ˆ0,1ˆ xvxu ,ˆ,,,,ˆ2

2

xIsyxIDvu

,ˆ1,0ˆ;ˆ0,1ˆ yvxu xyIsyxIDvu

ˆ,,,,ˆ 2

Measurements: 2nd Derivatives

Page 11: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.11

ssyyxxIDsyxID

yxHsyxID T

,,sin,cosˆ,,,ˆ

sin,cos,sin,cos,,,,ˆ

In order to compute the (second) derivative along a direction of a (first) derivative along a direction we obtain a continuous and a lattice approximation as

x

y

sin

cossin,cosˆ,sin,cosˆ TTuv

x

y

Measurements: 2nd Derivatives (cont.)

Page 12: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.12

Features such as edges, corners, junction, and eyes are obtained by making some decision from the image measurements.

Decisions are the result of some comparison followed by a choice. Examples: (i) if a measurement is above a threshold, we accept; otherwise, we reject; (ii) if a measurement is the largest compared to others, we select it.

Image Features – Decisions!

Page 13: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.13

),,,(ˆ),

2,,(ˆmaxarg,max syxIDsyxIDyxs

TsyxIDsyxIDyx

),,,(ˆ),

2,,(ˆsuch that ,,

Edge threshold: Decision!

Edge orientation: Decision!

A step edge at The value is (equally) large for both andas shown (in red) for the scale s = 3 pixels. It is also large for values not shownHowever, the quantity is significantly larger for

),2/,,(~

syxID

),,,(~

),2/,,(~

syxIDsyxID

                               

                               

                               

                               

                           

                               

                               

                             

                               

syxID ,,,ˆ

syxID ,

2,,ˆ

3,

4,

6,0

Decisions: Edgels (Edge-pixels and Orientation)

Page 14: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.14

yx,3max

The gray level indicates the angle: the darkest one is 0 degrees. The larger the angle, the lighter its color, up to

),,,(ˆ),2

,,(ˆ,,, syxIDsyxIDsyx Strength of the Edgel

Edgel(x, y) if

else Nil

Tsyx ,,,

syxyxs ,,,maxarg,max

Decisions: Edgels (cont.)

Page 15: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.15

Decisions: Connecting Edgels (Pseudocode)

end

;,,,xNeighbors-Link;,,yx,Link

NIL,xEdgel if;sin;cos

,,Neighbors-Link

end;,,Neighbors-Link;,,Neighbors-Link

NIL,Edgel if,Follower-Contour

., location seed a withStart edgels. link to Algorithm

maxn

n

max

max

nnn

nn

n

n

n

cc

cc

cc

cc

cc

yxyyx

yxxyxxx

yx

yxyx

yxyx

yx

max

(xc , yc)

Page 16: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.16

Decisions: Connecting Edgels (Pseudocode)

endFalse;return

elseTrue;return

,2

3,I

~,

2

3,I

~

and ,2

,I~

,2

,I~

if

,,,Coherence

path. same on thereturn not do contours and changenot doescontrast that theso used is Coherence

end;,,,Neighbors-Link

;,,,Link,,,Coherence&,Edgel if

;sin;cos

,y,xNeighbors-Link

1maxmax

1maxmax

max

max

max

maxcc

Ts,yxs,yx

Ts,yxs,yx

yxyx

yxyxyxyx

yxyxyxyyyxxx

cccnnn

cccnnn

nncc

nnnn

nncc

nnccnn

ccn

ccn

c

Page 17: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.17

We have considered at least four parameters: 1,,, TTTT H

How to estimate them? One technique is Histogram partitioning:plot the histogram and find the parameter that “best partitions it”.

syxID ,2/,,ˆ

ountingHistogram c:

T

Threshold Parameters: Estimation

Page 18: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.18

yxyyxxyx sss ,sin,cos, maxmaxmax Angle change

y

x

yxs ,max

2

sin,cosmax yyxxs

2

,max

yxs

A contour segment

yxs ,max

22 sincos yx is the contour curvature multiplied by the arc length , where

yxs ,max .,max yxs where

Decisions: Local Angle Change

Page 19: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.19

2

2

222

2

2

32

2

2

222

2

2

2

2

22

2

2

2

ˆˆˆˆˆ2ˆˆ

ˆ

1

ˆ

Thus, .ˆby given is which arc, theoflength by the divided change angle thebe willcurvature the

ˆˆˆˆˆ2ˆˆ

ˆ

1

ˆ

ˆ

ˆˆ

ˆˆˆˆ

ˆ

ˆ),(

ˆ

ˆ

i.e.,

Isocontour thealong movingwhen ˆ vector d)(normalize with theoccurs

change (angle)much howask simply can onecontour -iso theof curvature theestimate To

y)(x, from direction in the movingby contour -Iso thefollowcan one Thus,

IsoContour theo tangent tisˆ

I of change maximal ofdirection theisit as ,Isocontour the tonormal isˆ),(ˆ

xI

yI

xyI

xI

yI

yI

xI

II

I

xI

yI

xyI

xI

yI

yI

xI

I

xI

yI

yI

xyI

yxI

xI

xI

yI

I

IyxH

I

I

I

I

I

ICyxI

Curvature of Isocontour

Page 20: January 19, 2006Computer Vision © 2006 Davi GeigerLecture 1.1 Image Measurements and Detection Davi Geiger geiger@cs.nyu.edu

January 19, 2006 Computer Vision © 2006 Davi Geiger Lecture 1.20

IIyxH

yxHyxH

IIyxHII

IyxHII

yxHII

I

ICyxI

ˆandˆ thengrepresenti),( of rseigenvecto two

for thesearch theas maximal isother theandlowest is onesuch that sderivative

orthogonal twoof smeasurmentby drepresente ,detector" edge"our interpret nowcan We

negative.-non are seigenvalue thei.e., matrix,

symmetric a is),( that Notezero. be to),( of eigenvaluesmallest expect the we

)0( curvature zero i.e., segments),(straight linesstraight are that contours-isofor Thus,

ˆˆ),()ˆ(ˆ

1

thereforeis eigenvalueminimun theand

,ˆ),()ˆ(ˆ

1

thereforeis eigenvalue maximum Thes.eigenvalueminimun and maximum

thetoingcorrespond),( of rseigenvecto theare ˆ andˆ vectors, two theseThus,

IsoContour theo tangent tisˆ

I of change maximal ofdirection theisit as ,Isocontour the tonormal isˆ),(ˆ

2min

2max

Curvature of Isocontour (cont.)