Ask Your Question

dataquerent's profile - activity

2014-04-08 21:14:43 -0600 received badge  Supporter (source)
2014-04-07 22:17:44 -0600 asked a question Traincascade and objdetect executables have error messages

I want to use cascade training to recognize barcodes.

As a first step, I thought I would try to build the sample programs, even though they use faces, not barcodes.

The "make" command seemed to complete successfully, and put executables in the /bin directory.

Then I got the following errors:

../../bin/opencv_test_objdetect
OpenCV version: 2.4.8
OpenCV VCS version: unknown
Build type: release
CPU features: sse sse2 sse3
[==========] Running 3 tests from 3 test cases.
[----------] Global test environment set-up.
[----------] 1 test from Objdetect_HOGDetectorReadWrite
[ RUN      ] Objdetect_HOGDetectorReadWrite.regression
/home/user/Desktop/computerVision/opencv-2.4.8/modules/objdetect/test/test_cascadeandhog.cpp:525: Failure
Value of: img.empty()
  Actual: true
Expected: false
[  FAILED  ] Objdetect_HOGDetectorReadWrite.regression (0 ms)
[----------] 1 test from Objdetect_HOGDetectorReadWrite (0 ms total)

[----------] 1 test from Objdetect_CascadeDetector
[ RUN      ] Objdetect_CascadeDetector.regression
/home/user/Desktop/computerVision/opencv-2.4.8/modules/ts/src/ts.cpp:519: Failure
Failed

        failure reason: Invalid test data
        test case #-1
        seed: ffffffffffffffff
-----------------------------------
        LOG: validation file is not determined or not correct
-----------------------------------

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

[----------] 1 test from Objdetect_HOGDetector
[ RUN      ] Objdetect_HOGDetector.regression
/home/user/Desktop/computerVision/opencv-2.4.8/modules/ts/src/ts.cpp:519: Failure
Failed

        failure reason: Invalid test data
        test case #-1
        seed: ffffffffffffffff
-----------------------------------
        LOG: validation file is not determined or not correct
-----------------------------------

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

[----------] Global test environment tear-down
[==========] 3 tests from 3 test cases ran. (1 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 3 tests, listed below:
[  FAILED  ] Objdetect_HOGDetectorReadWrite.regression
[  FAILED  ] Objdetect_CascadeDetector.regression
[  FAILED  ] Objdetect_HOGDetector.regression

 3 FAILED TESTS
  YOU HAVE 2 DISABLED TESTS

This was very interesting because nothing in the tutorial code seems to supply such error-checking.

The tutorial is at:

http://docs.opencv.org/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.html?highlight=objdetect

I ran the executable in the directory

opencv-2.4.8/data/haarcascades

because that contains two files that are mentioned in the code:

"haarcascade_frontalface_alt.xml"

"haarcascade_eye_tree_eyeglasses.xml"

Apparently this code requires input from a webcam as well as XML files, but it doesn't turn on the webcam automatically.

In fact, I want to run this without getting input from a webcam, but for the moment, I don't mind doing whatever is necessary to get it to run properly.

Thanks.