Docsity

Corner Detection: Least-Squares Solution for Ideal Corner Intersection - Prof. Serge J. Be, Study notes of Computer Science

Toggle sidebar
bg1
Notes on Corner Detection
S. Belongie
Jul. 13, 2000
1 Formulating the Cost Function
Consider a neighborhood of an image containing an ideal corner. As drawn in Figure 1(a),
the tangent lines to the shape intersect exactly at the location of the corner.
In real images, the corners aren’t this clean and we need an approximate solution. We will
seek a least-squares solution for the point of intersection of the tangent lines, as suggested
in Figure 1(b).
The equation for the tangent line `x0passing through a pixel at location x0is
Dx0(x) = ∇I(x0)>(x−x0) = 0
where ∇I(x0) denotes the gradient of the image Iat x0, indicated by the small arrow in
Figure 1(b). Our goal is to find the point xowith the minimum perpendicular distance to
all the lines in this neighborhood:
xo= arg min
x∈R2Zx0∈N
Dx0(x)2dx0
where Ndenotes the neighborhood around a candidate corner location. This expression
is the weighted integral of the squares of the distances from xto all lines in N.Dx0(x)
(a) (b)
Figure 1: (a) Ideal case: tangent lines intersect exactly at corner. (b) In real images, we can
only hope to find an approximation to this point of intersection, indicated here by the dot.
The arrow indicates a gradient vector at a sample pixel.
1
pf3

Partial preview of the text

Download Corner Detection: Least-Squares Solution for Ideal Corner Intersection - Prof. Serge J. Be and more Study notes Computer Science in PDF only on Docsity!

Notes on Corner Detection

S. Belongie

Jul. 13, 2000

1 Formulating the Cost Function

Consider a neighborhood of an image containing an ideal corner. As drawn in Figure 1(a), the tangent lines to the shape intersect exactly at the location of the corner. In real images, the corners aren’t this clean and we need an approximate solution. We will seek a least-squares solution for the point of intersection of the tangent lines, as suggested in Figure 1(b). The equation for the tangent line `x′ passing through a pixel at location x′^ is

Dx′ (x) = ∇I(x′)>(x − x′) = 0

where ∇I(x′) denotes the gradient of the image I at x′, indicated by the small arrow in Figure 1(b). Our goal is to find the point xo with the minimum perpendicular distance to all the lines in this neighborhood:

xo = arg min x∈R^2

x′∈N

Dx′ (x)^2 dx′

where N denotes the neighborhood around a candidate corner location. This expression is the weighted integral of the squares of the distances from x to all lines in N. Dx′^ (x)

(a) (b)

Figure 1: (a) Ideal case: tangent lines intersect exactly at corner. (b) In real images, we can only hope to find an approximation to this point of intersection, indicated here by the dot. The arrow indicates a gradient vector at a sample pixel.

describes the distance from x to the line `x′^ multiplied by the gradient magnitude. In this way we give more weight to lines that pass through strong edge pixels. (Recall that pixels not on edges tend to have arbitrary gradient directions but small gradient magnitudes.)

2 The least-squares solution

We can find xo in closed form as follows:

xo = arg min x∈R^2

∇I(x′)>(x − x′)

dx′

= arg min x

(x − x′)>∇I(x′)∇I(x′)>(x − x′)dx′

= arg min x

x>Ax − 2 x>b + c (1)

where

A =

∇I(x′)∇I(x′)>dx′

b =

∇I(x′)∇I(x′)>x′dx′

c =

x′>∇I(x′)∇I(x′)>x′dx′

The arg min in Equation (1) can be found by taking its derivative w.r.t. x and setting it equal to zero. This gives 2 Ax − 2 b = 0 =⇒ Ax = b

at the minimum. Therefore xo = A−^1 b. Of course this only makes sense if A is of rank two. This will be so if there is significant gradient energy in more than one orientation.

3 Discussion

  • Different neighborhoods around a true corner location will each yield different estimates of xo. Keep the one from the neighborhood whose center is closest to xo.
  • The matrix A is known as the “windowed image second moment matrix” or just “sec- ond moment matrix.” The same matrix appears in Lucas and Kanade’s method of recovering optical flow.
  • Note the similarity between A and the covariance matrix for a collection of n gradient vectors.
  • The use of the second moment matrix (viz. its eigenvalues and eigenvectors) for lo- cal feature analysis goes by many names: Plessey-Harris operator, F¨orstner corner detector, orientation tensor, local structure tensor, etc. (So it must be important!)