Problem with MOG2 OCL test

asked 2017-10-16 08:13:46 -0500

qudlaty gravatar image

Hi, I've downloaded and compiled OpenCV 3.3 source from github. I'm trying to run the MOG2 OpenCL test (opencv_perf_video), but I get the following error:

opencv\sources\modules\video\perf\opencl\perf_bgfg_mog2.cpp(67): error: Value of: cap.isOpened()
Actual: false
Expected: true

I haven't modified the perf_bgfg_mog2.cpp file, just compiled it as-is. Could someone help me with troubleshooting this issue?

Many thanks

edit retag flag offensive close merge delete

Comments

"I haven't modified the perf_bgfg_mog2.cpp file," -- you're not expected to do that, all fine there ;)

the test tries to load 2 video files, which are not present on your opencv install by default, you would need the https://github.com/opencv/opencv_extra repo for this.

berak gravatar imageberak ( 2017-10-16 08:18:09 -0500 )edit
1

I'm running it with an AVI file, just as I did in OpenCV3.0. Here's the command:

opencv_perf_video.exe --perf_min_samples=500 --perf_force_samples=500 --gtest_filter=OCL_MOG2_Apply_Mog2.Mog2/* --gtest_param_filter="(*gpu/video/768x576.avi*, 1)"  > log.txt
qudlaty gravatar imagequdlaty ( 2017-10-16 08:21:13 -0500 )edit
1

I do have those AVI files, as I was using them in OpenCV3.0

qudlaty gravatar imagequdlaty ( 2017-10-16 08:34:33 -0500 )edit

so, you can no more run the same test successfully, as in 3.0 ?

testcode was slightly modified (see last blame at bottom)

berak gravatar imageberak ( 2017-10-16 08:37:19 -0500 )edit

Exactly, it works flawlessly in 3.0.

qudlaty gravatar imagequdlaty ( 2017-10-16 08:45:30 -0500 )edit