CUDA::StereoSGM can not run

Hey my friends, I just did two things.
The first thing is that I downloaded some test data and ran the program opencv_test_cudastereo. I only downloaded two test data, the structure tree is as follows

$ tree -L 3
.
└── testdata
    ├── gpu
    │   ├── caltech
    │   ├── connectedcomponents
    │   ├── csstereobp
    │   ├── denoising
    │   ├── features2d
    │   ├── haarcascade
    │   ├── hog
    │   ├── labeling
    │   ├── lbpcascade
    │   ├── matchtemplate
    │   ├── meanshift
    │   ├── opticalflow
    │   ├── perf
    │   ├── stereobm
    │   └── stereobp
    └── stereomatching
        ├── algorithms
        └── datasets


The following is the result of running the program, but I can’t read its result.(Due to the limitation of the number of words in the forum, I deleted some “RUN OK” results in the middle part)

eunll0@eunll0:~/Downloads/Newopencv/oo/opencv/build/bin$ ./opencv_test_cudastereo 

Available options besides google test option: 
Usage: opencv_test_cudastereo [params] 

	--cuda_device (value:-1)
		CUDA device on which tests will be executed (-1 means all devices)
	-h, --help (value:false)
		Print help info

Run tests on all supported CUDA devices 

*** CUDA Device Query (Runtime API) version (CUDART static linking) *** 

Device count: 1

Device 0: "NVIDIA GeForce MX250"
  CUDA Driver Version / Runtime Version          12.0 / 12.0
  CUDA Capability Major/Minor version number:    6.1
  Total amount of global memory:                 2001 MBytes (2098331648 bytes)
  GPU Clock Speed:                               1.58 GHz
  Max Texture Dimension Size (x,y,z)             1D=(131072), 2D=(131072,65536), 3D=(16384,16384,16384)
  Max Layered Texture Size (dim) x layers        1D=(32768) x 2048, 2D=(32768,32768) x 2048
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per block:           1024
  Maximum sizes of each dimension of a block:    1024 x 1024 x 64
  Maximum sizes of each dimension of a grid:     2147483647 x 65535 x 65535
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and execution:                 Yes with 2 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Concurrent kernel execution:                   Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support enabled:                No
  Device is using TCC driver mode:               No
  Device supports Unified Addressing (UVA):      Yes
  Device PCI Bus ID / PCI location ID:           1 / 0
  Compute Mode:
      Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) 

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version  = 12.0, CUDA Runtime Version = 12.0, NumDevs = 1

CTEST_FULL_OUTPUT
OpenCV version: 4.7.0-dev
OpenCV VCS version: 4.7.0-96-gb3c9842a98
Build type: Release
Compiler: /usr/bin/c++  (ver 11.3.0)
Parallel framework: pthreads (nthreads=8)
CPU features: SSE? SSE2? SSE3? *SSE4.1? *SSE4.2? *FP16? *AVX? *AVX2? *AVX512-SKX?
Intel(R) IPP version: disabled
OpenCL is disabled
TEST: Skip tests with tags: 'mem_6gb', 'verylong'
[==========] Running 128 tests from 9 test cases.
[----------] Global test environment set-up.
[----------] 1 test from CudaStereo_StereoSGM
[ RUN      ] CudaStereo_StereoSGM.regression
/home/eunll0/Downloads/Newopencv/oo/opencv/modules/ts/src/ts.cpp:618: Failure
Failed

	failure reason: cvError invoked
	test case #-1
	seed: 0000000000000000
-----------------------------------
	LOG:
OpenCV Error:
	Unspecified error (OpenCV tests: Can't find required data file: stereomatching/datasets/datasets.xml) in findData, file /home/eunll0/Downloads/Newopencv/oo/opencv/modules/ts/src/ts.cpp, line 1071
OpenCV Error:
	Unspecified error (OpenCV tests: Can't find required data file: stereomatching/datasets/datasets.xml) in findData, file /home/eunll0/Downloads/Newopencv/oo/opencv/modules/ts/src/ts.cpp, line 1071

-----------------------------------

[  FAILED  ] CudaStereo_StereoSGM.regression (0 ms)
[----------] 1 test from CudaStereo_StereoSGM (0 ms total)

[----------] 4 tests from CUDA_StereoSGM_funcs/StereoSGM_CensusTransformImage
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformImage.Image/0, where GetParam() = (NVIDIA GeForce MX250, "stereobm/aloe-L.png", whole matrix)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformImage.Image/0 (71 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformImage.Image/1, where GetParam() = (NVIDIA GeForce MX250, "stereobm/aloe-L.png", sub matrix)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformImage.Image/1 (21 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformImage.Image/2, where GetParam() = (NVIDIA GeForce MX250, "stereobm/aloe-R.png", whole matrix)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformImage.Image/2 (22 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformImage.Image/3, where GetParam() = (NVIDIA GeForce MX250, "stereobm/aloe-R.png", sub matrix)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformImage.Image/3 (23 ms)
[----------] 4 tests from CUDA_StereoSGM_funcs/StereoSGM_CensusTransformImage (137 ms total)

[----------] 4 tests from CUDA_StereoSGM_funcs/StereoSGM_CensusTransformRandom
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformRandom.Random/0, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformRandom.Random/0 (1 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformRandom.Random/1, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformRandom.Random/1 (1 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformRandom.Random/2, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformRandom.Random/2 (0 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformRandom.Random/3, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_CensusTransformRandom.Random/3 (1 ms)
[----------] 4 tests from CUDA_StereoSGM_funcs/StereoSGM_CensusTransformRandom (3 ms total)

[----------] 96 tests from CUDA_StereoSGM_funcs/StereoSGM_PathAggregation
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/0, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/0 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/1, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/1 (18 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/2, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/2 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/3, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/3 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/4, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/4 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/5, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/5 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/6, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/6 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/7, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/7 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/8, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/8 (12 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/9, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/9 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/10, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/10 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/11, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomLeft2Right/11 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/0, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/0 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/1, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/1 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/2, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/2 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/3, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/3 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/4, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/4 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/5, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/5 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/6, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/6 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/7, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/7 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/8, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/8 (14 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/9, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/9 (12 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/10, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/10 (12 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/11, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomRight2Left/11 (14 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/0, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/0 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/1, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/1 (18 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/2, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/2 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/3, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/3 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/4, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/4 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/5, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/5 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/6, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/6 (12 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/7, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/7 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/8, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/8 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/9, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/9 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/10, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/10 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/11, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUp2Down/11 (12 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/0, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/0 (18 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/1, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/1 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/2, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/2 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/3, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/3 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/4, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/4 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/5, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/5 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/6, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/6 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/7, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/7 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/8, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/8 (14 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/9, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/9 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/10, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/10 (14 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/11, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDown2Up/11 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/0, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/0 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/1, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/1 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/2, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/2 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/3, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/3 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/4, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/4 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/5, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/5 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/6, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/6 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/7, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/7 (14 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/8, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/8 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/9, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/9 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/10, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/10 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/11, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpLeft2DownRight/11 (14 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/0, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/0 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/1, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/1 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/2, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/2 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/3, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/3 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/4, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/4 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomUpRight2DownLeft/5, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownRight2UpLeft/11 (12 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/0, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/0 (19 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/1, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/1 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/2, where GetParam() = (NVIDIA GeForce MX250, 128x128, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/2 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/3, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/3 (17 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/4, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/4 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/5, where GetParam() = (NVIDIA GeForce MX250, 128x128, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/5 (16 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/6, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/6 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/7, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/7 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/8, where GetParam() = (NVIDIA GeForce MX250, 113x113, whole matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/8 (15 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/9, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 0)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/9 (14 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/10, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/10 (13 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/11, where GetParam() = (NVIDIA GeForce MX250, 113x113, sub matrix, 10)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_PathAggregation.RandomDownLeft2UpRight/11 (13 ms)
[----------] 96 tests from CUDA_StereoSGM_funcs/StereoSGM_PathAggregation (1422 ms total)

[----------] 8 tests from CUDA_StereoSGM_funcs/StereoSGM_WinnerTakesAll
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_WinnerTakesAll.RandomLeft/0, where GetParam() = (NVIDIA GeForce MX250, 128x128, false, 3)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_WinnerTakesAll.RandomLeft/0 (24 ms)
[ RUN      ] CUDA_StereoSGM_funcs/StereoSGM_WinnerTakesAll.RandomLeft/1, where GetParam() = (NVIDIA GeForce MX250, 128x128, false, 1)
[       OK ] CUDA_StereoSGM_funcs/StereoSGM_WinnerTakesAll.RandomLeft/7 (30 ms)
[----------] 8 tests from CUDA_StereoSGM_funcs/StereoSGM_WinnerTakesAll (219 ms total)

[----------] 5 tests from CUDA_Stereo/StereoBM
[ RUN      ] CUDA_Stereo/StereoBM.Regression/0, where GetParam() = NVIDIA GeForce MX250
[       OK ] CUDA_Stereo/StereoBM.Regression/0 (33 ms)
[ RUN      ] CUDA_Stereo/StereoBM.PrefilterXSobelRegression/0, where GetParam() = NVIDIA GeForce MX250
[       OK ] CUDA_Stereo/StereoBM.PrefilterXSobelRegression/0 (31 ms)
[ RUN      ] CUDA_Stereo/StereoBM.PrefilterNormRegression/0, where GetParam() = NVIDIA GeForce MX250
[       OK ] CUDA_Stereo/StereoBM.PrefilterNormRegression/0 (33 ms)
[ RUN      ] CUDA_Stereo/StereoBM.Streams/0, where GetParam() = NVIDIA GeForce MX250
[       OK ] CUDA_Stereo/StereoBM.Streams/0 (31 ms)
[ RUN      ] CUDA_Stereo/StereoBM.Uniqueness_Regression/0, where GetParam() = NVIDIA GeForce MX250
[       OK ] CUDA_Stereo/StereoBM.Uniqueness_Regression/0 (32 ms)
[----------] 5 tests from CUDA_Stereo/StereoBM (160 ms total)

[----------] 1 test from CUDA_Stereo/StereoBeliefPropagation
[ RUN      ] CUDA_Stereo/StereoBeliefPropagation.Regression/0, where GetParam() = NVIDIA GeForce MX250
[       OK ] CUDA_Stereo/StereoBeliefPropagation.Regression/0 (129 ms)
[----------] 1 test from CUDA_Stereo/StereoBeliefPropagation (129 ms total)

[----------] 1 test from CUDA_Stereo/StereoConstantSpaceBP
[ RUN      ] CUDA_Stereo/StereoConstantSpaceBP.Regression/0, where GetParam() = NVIDIA GeForce MX250
[       OK ] CUDA_Stereo/StereoConstantSpaceBP.Regression/0 (315 ms)
[----------] 1 test from CUDA_Stereo/StereoConstantSpaceBP (315 ms total)

[----------] 8 tests from CUDA_Stereo/ReprojectImageTo3D
[ RUN      ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/0, where GetParam() = (NVIDIA GeForce MX250, 128x128, CV_8U, whole matrix)
[       OK ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/0 (2 ms)
[ RUN      ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/1, where GetParam() = (NVIDIA GeForce MX250, 128x128, CV_8U, sub matrix)
[       OK ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/1 (1 ms)
[ RUN      ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/2, where GetParam() = (NVIDIA GeForce MX250, 128x128, CV_16S, whole matrix)
[       OK ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/2 (0 ms)
[ RUN      ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/3, where GetParam() = (NVIDIA GeForce MX250, 128x128, CV_16S, sub matrix)
[       OK ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/3 (1 ms)
[ RUN      ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/4, where GetParam() = (NVIDIA GeForce MX250, 113x113, CV_8U, whole matrix)
[       OK ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/4 (0 ms)
[ RUN      ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/5, where GetParam() = (NVIDIA GeForce MX250, 113x113, CV_8U, sub matrix)
[       OK ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/5 (0 ms)
[ RUN      ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/6, where GetParam() = (NVIDIA GeForce MX250, 113x113, CV_16S, whole matrix)
[       OK ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/6 (1 ms)
[ RUN      ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/7, where GetParam() = (NVIDIA GeForce MX250, 113x113, CV_16S, sub matrix)
[       OK ] CUDA_Stereo/ReprojectImageTo3D.Accuracy/7 (0 ms)
[----------] 8 tests from CUDA_Stereo/ReprojectImageTo3D (5 ms total)

[----------] Global test environment tear-down
[==========] 128 tests from 9 test cases ran. (2390 ms total)
[  PASSED  ] 127 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] CudaStereo_StereoSGM.regression

 1 FAILED TEST

The second thing is that I modified my program, the code is as follows:

int main()
{
    using namespace cv;
    using namespace cuda;
    Mat Leftimg,Rightimg,now;
    Leftimg = imread("./Left.jpg",ImreadModes::IMREAD_GRAYSCALE);
    Rightimg = imread("./Right.jpg",ImreadModes::IMREAD_GRAYSCALE);
    cv::resize(Leftimg,Leftimg,Size(1280,720));
    cv::resize(Rightimg,Rightimg,Size(1280,720));
    GpuMat left,right,disp;
    int64 t= getTickCount();
    left.upload(Leftimg);
    right.upload(Rightimg);
    Ptr<cuda::StereoSGM> sgm = cuda::createStereoSGM(0,256);
    sgm->compute(left,right,disp);
    disp.download(now);
    cout<<"GPUMODE:  "<<(getTickCount() - t)*1000/getTickFrequency()<<endl;
    t = getTickCount();
    Mat now1;
    Ptr<StereoSGBM> sgbm = StereoSGBM::create(0,256);
    sgbm->compute(Leftimg,Rightimg,now1);
    cout<<"CUPMODE:  "<<(getTickCount() - t)*1000/getTickFrequency()<<endl;

    waitKey(0);
    return 0;
}

As my friend @cudawarped said, after I used the resize function, my program was able to run successfully under the condition of numDisparities == 256 and gave the following results:

$ ./t3 
GPUMODE:  113.534
CUPMODE:  542.072
$ ./t3 
GPUMODE:  111.887
CUPMODE:  538.276
$ ./t3 
GPUMODE:  111.675
CUPMODE:  540.552

Since I do not have a deep understanding of the implementation process of the SGBM algorithm, I can only briefly summarize the following conclusions under this question:

  1. Compared with i5-8265u CPU, MX250+CUDA can accelerate the speed of stereo image matching
  2. The calculation amount of the SGBM matching algorithm at different resolutions should increase exponentially. However, I don’t know the storage space required to calculate the stereo matching at 1920x1080 resolution.

All in all, thanks a lot for everyone on the forum who helped me

1 Like