Repository: opencv
Issue: opencv_test_cudaoptflow unit test item fails
Labels: category: gpu/cuda (contrib)

##### System information (version)

    OpenCV => 4.5.3
    Operating System / Platform => Ubuntu 18.04
    Compiler => gcc 7.5.0

##### Detailed description

Compile OpenCV with GPU CUDA support and with its unit tests, howerver **opencv_test_cudaoptflow** test binary fails.

**On GPU Quadro M1200:**

[ FAILED ] 46 tests, listed below:
[ FAILED ] CUDA_OptFlow/BroxOpticalFlow.Regression/0, where GetParam() = Quadro M1200
[ FAILED ] CUDA_OptFlow/BroxOpticalFlow.OpticalFlowNan/0, where GetParam() = Quadro M1200
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/0, where GetParam() = (Quadro M1200, Chan(1), DataType(0))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/1, where GetParam() = (Quadro M1200, Chan(1), DataType(2))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/2, where GetParam() = (Quadro M1200, Chan(1), DataType(4))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/3, where GetParam() = (Quadro M1200, Chan(1), DataType(5))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/4, where GetParam() = (Quadro M1200, Chan(3), DataType(0))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/5, where GetParam() = (Quadro M1200, Chan(3), DataType(2))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/6, where GetParam() = (Quadro M1200, Chan(3), DataType(4))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/7, where GetParam() = (Quadro M1200, Chan(3), DataType(5))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/8, where GetParam() = (Quadro M1200, Chan(4), DataType(0))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/9, where GetParam() = (Quadro M1200, Chan(4), DataType(2))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/10, where GetParam() = (Quadro M1200, Chan(4), DataType(4))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/11, where GetParam() = (Quadro M1200, Chan(4), DataType(5))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/0, where GetParam() = (Quadro M1200, PyrScale(0.3), PolyN(5), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/1, where GetParam() = (Quadro M1200, PyrScale(0.3), PolyN(5), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/2, where GetParam() = (Quadro M1200, PyrScale(0.3), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/3, where GetParam() = (Quadro M1200, PyrScale(0.3), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/4, where GetParam() = (Quadro M1200, PyrScale(0.3), PolyN(7), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/5, where GetParam() = (Quadro M1200, PyrScale(0.3), PolyN(7), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/6, where GetParam() = (Quadro M1200, PyrScale(0.3), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/7, where GetParam() = (Quadro M1200, PyrScale(0.3), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/8, where GetParam() = (Quadro M1200, PyrScale(0.5), PolyN(5), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/9, where GetParam() = (Quadro M1200, PyrScale(0.5), PolyN(5), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/10, where GetParam() = (Quadro M1200, PyrScale(0.5), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/11, where GetParam() = (Quadro M1200, PyrScale(0.5), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/12, where GetParam() = (Quadro M1200, PyrScale(0.5), PolyN(7), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/13, where GetParam() = (Quadro M1200, PyrScale(0.5), PolyN(7), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/14, where GetParam() = (Quadro M1200, PyrScale(0.5), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/15, where GetParam() = (Quadro M1200, PyrScale(0.5), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/16, where GetParam() = (Quadro M1200, PyrScale(0.8), PolyN(5), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/17, where GetParam() = (Quadro M1200, PyrScale(0.8), PolyN(5), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/18, where GetParam() = (Quadro M1200, PyrScale(0.8), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/19, where GetParam() = (Quadro M1200, PyrScale(0.8), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/20, where GetParam() = (Quadro M1200, PyrScale(0.8), PolyN(7), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/21, where GetParam() = (Quadro M1200, PyrScale(0.8), PolyN(7), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/22, where GetParam() = (Quadro M1200, PyrScale(0.8), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/23, where GetParam() = (Quadro M1200, PyrScale(0.8), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/OpticalFlowDual_TVL1.Accuracy/0, where GetParam() = (Quadro M1200, Gamma(0))
[ FAILED ] CUDA_OptFlow/OpticalFlowDual_TVL1.Accuracy/1, where GetParam() = (Quadro M1200, Gamma(1))
[ FAILED ] CUDA_OptFlow/OpticalFlowDual_TVL1.Async/0, where GetParam() = (Quadro M1200, Gamma(0))
[ FAILED ] CUDA_OptFlow/OpticalFlowDual_TVL1.Async/1, where GetParam() = (Quadro M1200, Gamma(1))
[ FAILED ] CUDA_OptFlow/NvidiaOpticalFlow_1_0.Regression/0, where GetParam() = Quadro M1200
[ FAILED ] CUDA_OptFlow/NvidiaOpticalFlow_1_0.OpticalFlowNan/0, where GetParam() = Quadro M1200
[ FAILED ] CUDA_OptFlow/NvidiaOpticalFlow_2_0.Regression/0, where GetParam() = Quadro M1200
[ FAILED ] CUDA_OptFlow/NvidiaOpticalFlow_2_0.OpticalFlowNan/0, where GetParam() = Quadro M1200

46 FAILED TESTS

**On GPU GeForce GTX 1080 Ti:**

[ FAILED ] 42 tests, listed below:
[ FAILED ] CUDA_OptFlow/BroxOpticalFlow.Regression/0, where GetParam() = GeForce GTX 1080 Ti
[ FAILED ] CUDA_OptFlow/BroxOpticalFlow.OpticalFlowNan/0, where GetParam() = GeForce GTX 1080 Ti
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/0, where GetParam() = (GeForce GTX 1080 Ti, Chan(1), DataType(0))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/1, where GetParam() = (GeForce GTX 1080 Ti, Chan(1), DataType(2))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/2, where GetParam() = (GeForce GTX 1080 Ti, Chan(1), DataType(4))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/3, where GetParam() = (GeForce GTX 1080 Ti, Chan(1), DataType(5))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/4, where GetParam() = (GeForce GTX 1080 Ti, Chan(3), DataType(0))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/5, where GetParam() = (GeForce GTX 1080 Ti, Chan(3), DataType(2))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/6, where GetParam() = (GeForce GTX 1080 Ti, Chan(3), DataType(4))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/7, where GetParam() = (GeForce GTX 1080 Ti, Chan(3), DataType(5))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/8, where GetParam() = (GeForce GTX 1080 Ti, Chan(4), DataType(0))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/9, where GetParam() = (GeForce GTX 1080 Ti, Chan(4), DataType(2))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/10, where GetParam() = (GeForce GTX 1080 Ti, Chan(4), DataType(4))
[ FAILED ] CUDA_OptFlow/PyrLKOpticalFlow.Sparse/11, where GetParam() = (GeForce GTX 1080 Ti, Chan(4), DataType(5))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/0, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.3), PolyN(5), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/1, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.3), PolyN(5), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/2, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.3), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/3, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.3), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/4, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.3), PolyN(7), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/5, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.3), PolyN(7), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/6, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.3), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/7, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.3), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/8, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.5), PolyN(5), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/9, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.5), PolyN(5), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/10, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.5), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/11, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.5), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/12, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.5), PolyN(7), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/13, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.5), PolyN(7), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/14, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.5), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/15, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.5), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/16, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.8), PolyN(5), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/17, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.8), PolyN(5), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/18, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.8), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/19, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.8), PolyN(5), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/20, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.8), PolyN(7), 0, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/21, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.8), PolyN(7), 0, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/22, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.8), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(false))
[ FAILED ] CUDA_OptFlow/FarnebackOpticalFlow.Accuracy/23, where GetParam() = (GeForce GTX 1080 Ti, PyrScale(0.8), PolyN(7), 0|OPTFLOW_FARNEBACK_GAUSSIAN, UseInitFlow(true))
[ FAILED ] CUDA_OptFlow/OpticalFlowDual_TVL1.Accuracy/0, where GetParam() = (GeForce GTX 1080 Ti, Gamma(0))
[ FAILED ] CUDA_OptFlow/OpticalFlowDual_TVL1.Accuracy/1, where GetParam() = (GeForce GTX 1080 Ti, Gamma(1))
[ FAILED ] CUDA_OptFlow/OpticalFlowDual_TVL1.Async/0, where GetParam() = (GeForce GTX 1080 Ti, Gamma(0))
[ FAILED ] CUDA_OptFlow/OpticalFlowDual_TVL1.Async/1, where GetParam() = (GeForce GTX 1080 Ti, Gamma(1))

42 FAILED TESTS

##### Steps to reproduce

Execute whole unit test bundle by calling: in opencv/<build dir> make test 

or 

Call gtest binary: opencv/<build dir>/bin/opencv_test_cudaoptflow

##### Issue submission checklist

 - [X] I report the issue, it's not a question
 - [X] I checked the problem with documentation, FAQ, open issues,
       forum.opencv.org, Stack Overflow, etc and have not found solution
 - [X] I updated to latest OpenCV version and the issue is still there
 - [X] There is reproducer code and related data files: videos, images, onnx, etc