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.
vpi光流
It was also very inaccurate when I use optical flow for image alignment.
vpi对齐
But using opencv is fine:
img_align

Hi,

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

https://docs.nvidia.com/vpi/algo_optflow_dense.html

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

Thanks.

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