https://www.cnblogs.com/Jack-Elvis/p/11640931.html
https://www.cnblogs.com/jiahenhe2/p/7930802.html
CV_EXPORTS_W void cornerHarris( InputArray src, OutputArray dst, int blockSize,
int ksize, double k,
int borderType = BORDER_DEFAULT );
@brief Calculates eigenvalues and eigenvectors of image blocks for corner detection.
For every pixel \(p\) , the function cornerEigenValsAndVecs considers a blockSize \(\times\) blockSize
neighborhood \(S(p)\) . It calculates the covariation matrix of derivatives over the neighborhood as:
where the derivatives are computed using the Sobel operator.
After that, it finds eigenvectors and eigenvalues of \(M\) and stores them in the destination image as
\((\lambda_1, \lambda_2, x_1, y_1, x_2, y_2)\) where
- \(\lambda_1, \lambda_2\) are the non-sorted eigenvalues of \(M\)
- \(x_1, y_1\) are the eigenvectors corresponding to \(\lambda_1\)
- \(x_2, y_2\) are the eigenvectors corresponding to \(\lambda_2\)
The output of the function can be used for robust edge or corner detection.
@param src Input single-channel 8-bit or floating-point image.
@param dst Image to store the results. It has the same size as src and the type CV_32FC(6) .
@param blockSize Neighborhood size (see details below).
@param ksize Aperture parameter for the Sobel operator.
@param borderType Pixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.
@sa cornerMinEigenVal, cornerHarris, preCornerDetect