This problem comes from function getRectSubPix_8u32f
in OpenCV. Basically, the target is to interpolate following pixel's intensity(denote as I(a,b)
):
but what puzzled me was the code snippet:
float a = center.x - ip.x;
float b = center.y - ip.y;
a = MAX(a,0.0001f);
Why manually setting a floor 0.0001
here? To my understanding, intensity of p
should be I(0,0)
if p
is exactly located at (0,0)
. So what is the material thought here? And why not set a floor for b
?