OCL_ObjDetect/Haar.FaceDetect cannot find resource files (Bug #3609)
Description
The OCL_ObjDetect/Haar.FaceDetect tests fail with an assertion failure:
/home/tstellar/opencv/modules/ocl/test/test_objdetect.cpp:211: Failure
Value of: cascade.load( cascadeName )
Actual: false
Expected: true
To reproduce: ./opencv_test_ocl --gtest_filter=OCL_ObjDetect/Haar.FaceDetect/*
The problem is that the test is not looking for the data files in the correct location:
cascadeName = (string(cvtest::TS::ptr()->get_data_path()) + "cv/cascadeandhog/cascades/").append(GET_PARAM(1));
In this case it is looking for the haarcascade_frontalface_alt.xm file, which is located at ./data/haarcascades/haarcascade_frontalface_alt.xml
img = readImage("cv/shared/lena.png", IMREAD_GRAYSCALE);
There are 3 lena.png files in my tree, I'm not sure which one is supposed to be loaded:
./samples/cpp/lena.jpg
./samples/c/lena.jpg
./modules/java/android_test/res/drawable/lena.jpg
The OCL_ObjDetect/HOG.* test appears to have the same issue:
img_rgb = readImage("gpu/hog/road.png");
In my tree road.png is located at:
./samples/gpu/road.png
Associated revisions
Merge pull request #3609 from jet47:fix-ocv_add_module-2.4
History
Updated by Ivan Korolev almost 11 years ago
Hi Tom,
thanks for the bug report!
It should be noticed that all opencv test data is in opencv_extra repo (git clone git://github.com/Itseez/opencv_extra.git .). To run tests properly, set the environment variable OPENCV_TEST_DATA_PATH to <your_local_copy_of_opencv_extra>/testdata. Please see http://code.opencv.org/projects/opencv/wiki/QA_in_OpenCV. I have closed the ticket. Feel free to reopen the bug if it is necessary.
- Assignee set to Tom Stellard
- Category set to ts
- Status changed from New to Cancelled
Updated by Daniil Osokin almost 11 years ago
Hi, Tom! Does this issue still exist? Looks like we can close it.
Updated by Daniil Osokin almost 11 years ago
Ok, it's cancelled.