Why calcOpticalFlowPyrLK returns real values instead of integer pixel coordinates? [closed]

asked 2016-03-24 06:25:59 -0600

helio gravatar image

I'm using calcOpticalFlowPyrLK to infer the vector movement between 2 satellite images.

I wonder why nxtPts is an array of real numbers instead of an array of integers, in float precision if required, but integers aiming at precise pixels. I guess that, despite the method, in the end, a maximum cross correlation is used to find where is the best match for the prevPts pixel and its blockSize neighborhood. So I expected the resulted nxtPts to be pixel coordinates in the second raster image.

I have tried to set the pyramid maxLevel to 0 and to limit the corners to 1, in case that internal averages of the method among resulting vectors might lead to non-integer coordinates results, but the method still returns real coordinates.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-06 05:12:31.933125