Harris corner detector explained

The Harris corner detector is a corner detection operator that is commonly used in computer vision algorithms to extract corners and infer features of an image. It was first introduced by Chris Harris and Mike Stephens in 1988 upon the improvement of Moravec's corner detector. Compared to its predecessor, Harris' corner detector takes the differential of the corner score into account with reference to direction directly, instead of using shifting patches for every 45 degree angles, and has been proved to be more accurate in distinguishing between edges and corners. Since then, it has been improved and adopted in many algorithms to preprocess images for subsequent applications.

Introduction

A corner is a point whose local neighborhood stands in two dominant and different edge directions. In other words, a corner can be interpreted as the junction of two edges, where an edge is a sudden change in image brightness. Corners are the important features in the image, and they are generally termed as interest points which are invariant to translation, rotation and illumination. Although corners are only a small percentage of the image, they contain the most important features in restoring image information, and they can be used to minimize the amount of processed data for motion tracking, image stitching, building 2D mosaics, stereo vision, image representation and other related computer vision areas.

In order to capture the corners from the image, researchers have proposed many different corner detectors including the Kanade-Lucas-Tomasi (KLT) operator and the Harris operator which are most simple, efficient and reliable for use in corner detection. These two popular methodologies are both closely associated with and based on the local structure matrix. Compared to the Kanade-Lucas-Tomasi corner detector, the Harris corner detector provides good repeatability under changing illumination and rotation, and therefore, it is more often used in stereo matching and image database retrieval. Although there still exists drawbacks and limitations, the Harris corner detector is still an important and fundamental technique for many computer vision applications.

Development of Harris corner detection algorithm

Without loss of generality, we will assume a grayscale 2-dimensional image is used. Let this image be given by

I

. Consider taking an image patch

(x,y)\inW

(window) and shifting it by

(\Deltax,\Deltay)

. The sum of squared differences (SSD) between these two patches, denoted

f

, is given by:

f(\Deltax,\Deltay)=\underset{(xk,yk)\inW}\sum\left(I(xk,yk)-I(xk+\Deltax,yk+\Deltay)\right)2

I(x+\Deltax,y+\Deltay)

can be approximated by a Taylor expansion. Let

Ix

and

Iy

be the partial derivatives of

I

, such that

I(x+\Deltax,y+\Deltay)I(x,y)+Ix(x,y)\Deltax+Iy(x,y)\Deltay

This produces the approximation

f(\Deltax,\Deltay)\underset{(x,y)\inW}\sum\left(Ix(x,y)\Deltax+Iy(x,y)\Deltay\right)2,

which can be written in matrix form:

f(\Deltax,\Deltay)\begin{pmatrix}\Deltax&\Deltay\end{pmatrix}M\begin{pmatrix}\Deltax\\Deltay\end{pmatrix},

where M is the structure tensor,

M=\underset{(x,y)\inW}\sum

2
\begin{bmatrix} I
x

&IxIy\\ IxIy&

2
I
y

\end{bmatrix} = \begin{bmatrix} \underset{(x,y)\inW}\sum

2
I
x

&\underset{(x,y)\inW}\sumIxIy\\ \underset{(x,y)\inW}\sumIxIy&\underset{(x,y)\inW}\sum

2 \end{bmatrix}
I
y

Process of Harris corner detection algorithm[1] [2]

Commonly, Harris corner detector algorithm can be divided into five steps.

  1. Color to grayscale
  2. Spatial derivative calculation
  3. Structure tensor setup
  4. Harris response calculation
  5. Non-maximum suppression

Color to grayscale

If we use Harris corner detector in a color image, the first step is to convert it into a grayscale image, which will enhance the processing speed.

The value of the gray scale pixel can be computed as a weighted sums of the values R, B and G of the color image,

\sumC\in\{R,G,B\

} w_C \cdot C,

where, e.g.,

wR=0.299,wG=0.587,wB=1-(wR+wG)=0.114.

Spatial derivative calculation

Next, we are going to find the derivative with respect to x and the derivative with respect to y,

Ix(x,y)

and

Iy(x,y)

.

Structure tensor setup

With

Ix(x,y)

,

Iy(x,y)

, we can construct the structure tensor

M

.

Harris response calculation

For

x\lly

, one has

\tfrac{xy}{x+y}=x\tfrac{1}{1+x/y}x.

In this step, we compute the smallest eigenvalue of the structure tensor using that approximation:

λmin

λ1λ2
(λ1+λ2)

=

\det(M)
\operatorname{tr

(M)}

tr(M)=m11+m22

.

Another commonly used Harris response calculation is shown as below,

R=λ1λ2-k(λ1+λ

2
2)

=\det(M)-k\operatorname{tr}(M)2

where

k

is an empirically determined constant;

k\in[0.04,0.06]

.

Non-maximum suppression

In order to pick up the optimal values to indicate corners, we find the local maxima as corners within the window which is a 3 by 3 filter.

Improvement[3] [4]

  1. Harris-Laplace Corner Detector[5]
  2. Differential Morphological Decomposition Based Corner Detector[6]
  3. Multi-scale Bilateral Structure Tensor Based Corner Detector[7]

Applications

  1. Image Alignment, Stitching and Registration[8]
  2. 2D Mosaics Creation[9]
  3. 3D Scene Modeling and Reconstruction[10]
  4. Motion Detection[11]
  5. Object Recognition[12]
  6. Image Indexing and Content-based Retrieval[13]
  7. Video Tracking[14]

See also

External links

Notes and References

  1. Web site: Harris Operator Corner Detection using Sliding Window Method - Google Scholar. scholar.google.com. 2015-11-29.
  2. Web site: The Comparison and Application of Corner Detection Algorithms - Google Scholar. scholar.google.com. 2015-11-29.
  3. Improving Harris corner selection strategy. IET Computer Vision. 2011-03-01. 5. 2. 87. 10.1049/iet-cvi.2009.0127. F.. Bellavia. D.. Tegolo. C.. Valenti.
  4. Book: Machine Learning for High-Speed Corner Detection. Springer Berlin Heidelberg. 2006-05-07. 978-3-540-33832-1. 430–443. Lecture Notes in Computer Science. 10.1007/11744023_34. en. Edward. Rosten. Tom. Drummond. Aleš. Leonardis. Horst. Bischof. Axel. Pinz. 10.1.1.64.8513. 1388140 .
  5. Web site: A Comparison of Affine Region Detectors - Google Scholar. scholar.google.com. 2015-11-29.
  6. Multi scale Harris corner detector based on Differential Morphological Decomposition. Pattern Recognition Letters. 1714–1719. 32. 14. 10.1016/j.patrec.2011.07.021. L.. Gueguen. M.. Pesaresi. 2011. 2011PaReL..32.1714G .
  7. Web site: A Multi-scale Bilateral Structure Tensor Based Corner Detector - Google Scholar. scholar.google.com. 2015-11-29.
  8. Book: 2011-08-01. 3434–3437. 7. 10.1109/EMEIT.2011.6023066. Juan. Kang. Chuangbai. Xiao. M.. Deng. Jing. Yu. Haifeng. Liu. Proceedings of 2011 International Conference on Electronic & Mechanical Engineering and Information Technology . Image registration based on harris corner and mutual information . 978-1-61284-087-1. 17367248.
  9. Web site: Underwater Mosaic Creation using Video sequences from Different Altitudes - Google Scholar. scholar.google.com. 2015-12-02.
  10. Web site: Automated reconstruction of 3D scenes from sequences of images - Google Scholar. scholar.google.com. 2015-12-02.
  11. Book: 2008-07-01. 5287–5291. 10.1109/CCDC.2008.4598340. Meng. Liu. Chengdong. Wu. Yunzhou. Zhang. 2008 Chinese Control and Decision Conference . Multi-resolution optical flow tracking algorithm based on multi-scale Harris corner points feature . 978-1-4244-1733-9. 8085227.
  12. Web site: Object Recognition from Local Scale-Invariant Features - Google Scholar. scholar.google.com. 2015-11-29.
  13. Web site: Salient Points for Content Based Retrieval - Google Scholar. scholar.google.com. 2015-12-02.
  14. Web site: Tracking and Recognition of Objects using SURF Descriptor and Harris Corner Detection - Google Scholar. scholar.google.com. 2015-12-02.