Confusion about vpi calculation of optical flow

Hello, when I use vpi to calculate the optical flow between two images of size (320 * 180), vpi will output an optical flow image of (80 * 45), which is right. In order to obtain the optical flow image with the size of (320*180), I up-sampled the input image 4 times before calculating the optical flow. I ended up with an optical flow image of (320 * 180), but there was a problem. The optical flow image looked like a series of massed-blocks. I counted them carefully with the windows drawing tool, and the massed-blocks were exactly (4 * 4). This is quite puzzling to me as to why the output optical flow graph is a (4 * 4) Masseille block rather than a single optical flow pixel. Even if I don’t upsample, the output optical flow diagram still has (4 * 4) Masseille blocks.
It was also very inaccurate when I use optical flow for image alignment.
But using opencv is fine:


You can find the algorithm details below:
The algorithm splits input images into 4x4 pixel blocks.

Instead of scaling up the input image, have you tried to use the 320x180 input and scale up the 80x45 flow?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.