Lucas kanade optic flow Winsize parameter

asked 2020-05-18 13:58:15 -0600

xaru8145 gravatar image

Hi,

I am trying to calculate optic flow from an image using the opencv cpp implementation of the pyramidal Lucas-Kanade algorithm: cv.calcOpticalFlowPyrLK()

I am confused as for what the winSize parameter stands for. It is defined as: size of the search window at each pyramid level. Does that mean it refers to the neighborhood of points around the central pixel p you assume to optic flow to be "similar" in order to solve the optical flow equation?

The opencv documentation says:

We have seen an assumption before, that all the neighbouring pixels will have similar motion. Lucas-Kanade method takes a 3x3 patch around the point. So all the 9 points have the same motion.

Is this 3x3 the winSize parameter? If so, why is there an option to choose the parameter If it is fixed to 3?

Thanks!!

edit retag flag offensive close merge delete