Optical Flow SDK 3.0 and Global Flow vector

The 3.0 SDK’s sample apps don’t actually access or use the global flow buffer, so I had to hack it in to test it. After some typical difficulties, I was able to get at the global flow vector. It seems that on my 2080 its resolution is 4 pixels, i.e., all the vector values I get are multiples of 4. I have a test file where the second image is simply the first image translated by (-2.5,4.25) using texture fetches with linear filtering. The median of the flow vectors returned exactly matches this (as do the 10th and 90th percentiles for the slow and medium presets). However, the global flow vector is (-4.0,4.0).

While this is could be a great feature, having more accuracy would make it a lot better. I can get a better value by simply computing the median with something like cub::DeviceRadixSort, but of course that adds more cost to get something that should already be available.

I checked an RTX 3060 and saw the same results – the global flow vector is rounded to the nearest multiple of 4.

I’m also seeing the same thing.