static void
cornerEigenValsVecs( const Mat& src, Mat& eigenv, int block_size,
int aperture_size, int op_type, double k=0.,
int borderType=BORDER_DEFAULT )
{
int depth = src.depth();
double scale = (double)(1 << (aperture_size - 1)) * block_size; #1
if( depth == CV_8U )
scale *= 255.;
scale = 1./scale;
Mat Dx, Dy;
Sobel( src, Dx, CV_32F, 1, 0, aperture_size, scale, 0, borderType );
Sobel( src, Dy, CV_32F, 0, 1, aperture_size, scale, 0, borderType );
//......
}
These are the source codes from github openCV2(I remove some codes to make it easier to read).I can't understand why do they need to initialize the scale like that?I would simple initialize the scale as 1.