Significance of sobel's scale when searching corners

asked 2019-01-03 05:17:46 -0600

finley gravatar image

updated 2019-01-03 05:47:27 -0600

For function cornerEigenValsVecin corner.cpp, I am stuck on understanding effects of local variable scale(from line 257 to line 263).

int depth = src.depth();
double scale = (double)(1 << ((aperture_size > 0 ? aperture_size : 3) - 1)) * block_size;
if( aperture_size < 0 )
    scale *= 2.0;
if( depth == CV_8U )
    scale *= 255.0;
scale = 1.0/scale;

To my understanding, scale will be 1/(255*12) if src is of CV_8UC1; applying 1/255 will normalize pixels' intensity to [0,1] but how about additional scale 1/12? What is its effect?

edit retag flag offensive close merge delete