/// The NVIDIA optical flow hardware generates flow vectors at granularity gridSize, which can be queried via function getGridSize(). Upsampler() helper function converts the hardware-generated flow vectors to dense representation (1 flow vector for each pixel) using nearest neighbour upsampling method.
/// </summary>
/// <param name="flow">Buffer of type CV_16FC2 containing flow vectors generated by calc().</param>
/// <param name="imageSize">Size of the input image in pixels for which these flow vectors were generated.</param>
/// <param name="gridSize">Granularity of the optical flow vectors returned by calc() function.</param>
/// <param name="upsampledFlow">Buffer of type CV_32FC2, containing upsampled flow vectors, each flow vector for 1 pixel, in the pitch-linear layout.</param>
/// <param name="backendName">The name of the backend.</param>
/// <param name="propagateNumThreads">It true, the number of threads of the current enviroment will be passed to the new backend.</param>
/// <returns>True if backend is set</returns>
/// <remarks>This call is not thread-safe. Consider calling this function from the main() before any other OpenCV processing functions (and without any other created threads).</remarks>