Optical Flow SDK 3.0 global vector placement

Hi
I’m trying to use the optical flow SDK 3.0 to compute the flow vector to replace the motion vector from NVENC by Jetson Xavier.
image
Since I acquired the flow data from CNvOpticalFlowOCV.cpp
I found the size of array seems not the global one and I have no clue how to arrange the vector back to the original picture.
How can I know the placement rule of the array?
And If it is based on the ROI how can I define the ROI?
image