Harris Corner detection algorithm was developed to identify the internal corners of an image. The corners of an image are basically identified as the regions in which there are variations in large intensity of the gradient in all possible dimensions and directions. Corners extracted can be a part of the image features, which can be matched with features of other images, and can be used to extract accurate information. Harris Corner Detection is a method to extract the corners from the input image and to extract features from the input image.
About the function used:
Syntax: cv2.cornerHarris(src, dest, blockSize, kSize, freeParameter, borderType)
src – Input Image (Single-channel, 8-bit or floating-point)
dest – Image to store the Harris detector responses. Size is same as source image
blockSize – Neighborhood size ( for each pixel value blockSize * blockSize neighbourhood is considered )
ksize – Aperture parameter for the Sobel() operator
freeParameter – Harris detector free parameter
borderType – Pixel extrapolation method ( the extrapolation mode used returns the coordinate of the pixel corresponding to the specified extrapolated pixel )
Below is the Python implementation :
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Python | Corner Detection with Shi-Tomasi Corner Detection Method using OpenCV
- Real-Time Edge Detection using OpenCV in Python | Canny edge detection method
- OpenCV - Facial Landmarks and Face Detection using dlib and OpenCV
- Python | Detect corner of an image using OpenCV
- Python Program to detect the edges of an image using OpenCV | Sobel edge detection method
- Detection of a specific color(blue here) using OpenCV with Python
- Face Detection using Python and OpenCV with webcam
- Python | Smile detection using OpenCV
- Circle Detection using OpenCV | Python
- White and black dot detection using OpenCV | Python
- Pedestrian Detection using OpenCV-Python
- Multiple Color Detection in Real-Time using Python-OpenCV
- Gun Detection using Python-OpenCV
- Contour Detection with Custom Seeds using Python - OpenCV
- Line detection in python with OpenCV | Houghline method
- Text Detection and Extraction using OpenCV and OCR
- OpenCV Python program for Vehicle detection in a Video frame
- Opencv Python program for Face Detection
- Transition from OpenCV 2 to OpenCV 3.x
- OpenCV C++ Program for coin detection
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.