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 . Consider taking an image patch (window) and shifting it by . The sum of squared differences (SSD) between these two patches, denoted , is given by:
Process of Harris corner detection algorithm[4][5][6]
Commonly, Harris corner detector algorithm can be divided into five steps.
Color to grayscale
Spatial derivative calculation
Structure tensor setup
Harris response calculation
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,
,
where, e.g.,
Spatial derivative calculation
Next, we are going to find the derivative with respect to x and the derivative with respect to y, and .
This can be approximated by applying Sobel operators.
Structure tensor setup
With , , we can construct the structure tensor .
Harris response calculation
For , one has
In this step, we compute the smallest eigenvalue of the structure tensor using that approximation:
^ abChris Harris and Mike Stephens (1988). "A Combined Corner and Edge Detector". Alvey Vision Conference. Vol. 15.
^Dey, Nilanjan; et al. (2012). "A Comparative Study between Moravec and Harris Corner Detection of Noisy Images Using Adaptive Wavelet Thresholding Technique". arXiv:1209.1558 [cs.CV].
^Konstantinos G. Derpanis (2004). The harris corner detector. York University.
^Kang, Juan; Xiao, Chuangbai; Deng, M.; Yu, Jing; Liu, Haifeng (2011-08-01). "Image registration based on harris corner and mutual information". Proceedings of 2011 International Conference on Electronic & Mechanical Engineering and Information Technology. Vol. 7. pp. 3434–3437. doi:10.1109/EMEIT.2011.6023066. ISBN978-1-61284-087-1. S2CID17367248.
^Liu, Meng; Wu, Chengdong; Zhang, Yunzhou (2008-07-01). "Multi-resolution optical flow tracking algorithm based on multi-scale Harris corner points feature". 2008 Chinese Control and Decision Conference. pp. 5287–5291. doi:10.1109/CCDC.2008.4598340. ISBN978-1-4244-1733-9. S2CID8085227.