Corner Detection
Learn to detect corners from images.
We'll cover the following...
Corners are one of the most essential features in an image. Corners are points in an image where the direction of the intensity gradient changes abruptly. This means that the gradient vectors around a corner point have different orientations. These regions are often distinctive and can be used as landmarks or reference points for various computer vision tasks. Corner detection is very important for patch mapping, which is used to produce texture maps for geometric models of real-world objects.
We’ll use Harris corner detection to detect corners in this lesson. This algorithm, created by Chris Harris and Mike Stephens, works by taking the horizontal and vertical derivatives of image pixel values and looking for areas where these values are high.
But first, we need to convert our image to grayscale. As mentioned previously, this helps in simplifying algorithms and eliminates the complexity of the computational requirements of the Harris corner detection algorithm.
cv::cvtColor(img, src_gray, COLOR_BGR2GRAY);
...