Английская Википедия:Harris corner detector

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Шаблон:Short description 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.[1] 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.[2] 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.[3] 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 [1]

Without loss of generality, we will assume a grayscale 2-dimensional image is used. Let this image be given by <math>I</math>. Consider taking an image patch <math>(x, y) \in W</math>(window) and shifting it by <math>(\Delta x,\Delta y)</math>. The sum of squared differences (SSD) between these two patches, denoted <math>f</math>, is given by:

<math>

f(\Delta x,\Delta y) = \underset{(x_k,y_k)\in W}\sum\left(I(x_k,y_k) - I(x_k+\Delta x,y_k+\Delta y)\right)^2 </math>

<math>I(x+\Delta x,y+\Delta y)</math> can be approximated by a Taylor expansion. Let <math> I_x</math> and <math> I_y</math> be the partial derivatives of <math> I</math>, such that

<math>

I(x+\Delta x,y+\Delta y) \approx I(x,y) + I_x(x,y)\Delta x+I_y(x,y)\Delta y </math>

This produces the approximation

<math>

f(\Delta x,\Delta y) \approx \underset{(x,y)\in W}\sum \left( I_x(x,y)\Delta x + I_y(x,y)\Delta y \right)^2, </math>

which can be written in matrix form:

<math>

f(\Delta x,\Delta y) \approx \begin{pmatrix} \Delta x & \Delta y \end{pmatrix} M \begin{pmatrix} \Delta x \\ \Delta y \end{pmatrix}, </math>

where M is the structure tensor,

<math>

M = \underset{(x,y)\in W}\sum \begin{bmatrix} I_x^2 & I_x I_y \\ I_x I_y & I_y^2 \end{bmatrix} = \begin{bmatrix} \underset{(x,y)\in W}\sum I_x^2 &\underset{(x,y)\in W} \sum I_x I_y \\ \underset{(x,y)\in W}\sum I_x I_y & \underset{(x,y)\in W}\sum I_y^2 \end{bmatrix} </math>

Process of Harris corner detection algorithm[4][5][6]

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,

<math>\sum_{C\,\in\,\{R,G,B\}} w_C \cdot C</math>,

where, e.g.,

<math>w_R=0.299,\ w_G=0.587,\ w_B=1-(w_R+w_G)=0.114.</math>

Spatial derivative calculation

Next, we are going to find the derivative with respect to x and the derivative with respect to y, <math>I_x( x, y)</math> and <math>I_y( x, y)</math>.

Structure tensor setup

With <math> I_x( x, y)</math> , <math> I_y( x, y) </math>, we can construct the structure tensor <math> M </math>.

Harris response calculation

For <math>x\ll y</math>, one has <math>\tfrac{x\cdot y}{x+y}=x\tfrac{1}{1+x/y}\approx x.</math> In this step, we compute the smallest eigenvalue of the structure tensor using that approximation:

<math> \lambda _{\min} \approx \frac{ \lambda _1 \lambda _2} {(\lambda _1+\lambda _2)} = \frac{\det(M)} {\operatorname{tr}(M)} </math>

with the trace <math>\mathrm{tr}(M) = m_{11} + m_{22} </math>.

Another commonly used Harris response calculation is shown as below,

<math> R = \lambda _1 \lambda _2 - k(\lambda _1 + \lambda _2)^2 = \det(M) - k\operatorname{tr}(M)^2</math>

where <math> k </math> is an empirically determined constant; <math> k \in [0.04, 0.06] </math> .

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[7][8]

  1. Harris-Laplace Corner Detector[9]
  2. Differential Morphological Decomposition Based Corner Detector[10]
  3. Multi-scale Bilateral Structure Tensor Based Corner Detector[11]

Applications

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

See also

References

Шаблон:Reflist

External links

  1. 1,0 1,1 Ошибка цитирования Неверный тег <ref>; для сносок harris не указан текст
  2. Ошибка цитирования Неверный тег <ref>; для сносок dey не указан текст
  3. Ошибка цитирования Неверный тег <ref>; для сносок derpanis не указан текст
  4. Шаблон:Cite web
  5. Шаблон:Cite web
  6. Ошибка цитирования Неверный тег <ref>; для сносок sanchez не указан текст
  7. Шаблон:Cite journal
  8. Шаблон:Cite book
  9. Шаблон:Cite web
  10. Шаблон:Cite journal
  11. Шаблон:Cite web
  12. Шаблон:Cite book
  13. Шаблон:Cite web
  14. Шаблон:Cite web
  15. Шаблон:Cite book
  16. Шаблон:Cite web
  17. Шаблон:Cite web
  18. Шаблон:Cite web