wisnu rizky kurniawan
wisnu rizky kurniawan

Reputation: 41

haartraining in open cv 2.4.9 and ubuntu 14.04 LTS

I have tried the tutorial from http://coding-robin.de/2013/07/22/train-your-own-opencv-haar-classifier.html

I got error while run this command:

g++ `pkg-config --libs --cflags opencv` -I. -o mergevec mergevec.cpp\
cvboost.cpp cvcommon.cpp cvsamples.cpp cvhaarclassifier.cpp\
cvhaartraining.cpp\ -lopencv_core -lopencv_calib3d -lopencv_imgproc -lopencv_highgui -lopencv_objdetect

the error message :

g++: error: mergevec.cppcvboost.cpp: No such file or directory g++: error: cvhaarclassifier.cppcvhaartraining.cpp-lopencv_core: No such file or directory

then I tried to run the command like this:

g++ `pkg-config --libs --cflags opencv` -I. -o mergevec mergevec.cpp 
cvboost.cpp cvcommon.cpp cvsamples.cpp cvhaarclassifier.cpp 
cvhaartraining.cpp -lopencv_core -lopencv_calib3d -lopencv_highui -lopencv_objdetect/

and still met the error message like this:

/usr/bin/ld: cannot find -lopencv_highui /usr/bin/ld: cannot find -lopencv_objdetect/ collect2: error: ld returned 1 exit status

can anyone help me? thank you for your help

Upvotes: 2

Views: 346

Answers (1)

George J. Nassef Jr.
George J. Nassef Jr.

Reputation: 359

I had the same problem when scaling OpenCV haar up and down on different arch's of Ubuntu on EC2 until I found this python version of mergevec in github: https://github.com/wulfebw/mergevec created by wulfebw

It did the trick.

Just use the python version instead of compiling the one in the tutorial. As long as your OpenCV libraries are installed correctly with python, it should work.

Upvotes: 1

Related Questions