Ask Your Question
0

Building haartraining files in open cv

asked 2013-02-12 02:16:07 -0600

Ashwin gravatar image

updated 2013-02-12 02:31:40 -0600

I need to create a .exe file from the training samples that come with open cv(Windows).. So I am working on open cv and inserted all header files and all cpp files(createsamples.cpp, cvboost.cpp, cvhaarclassifier.cpp, cvhaartarining.cpp, cvsamples.cpp, cvcommon.cpp) in the respective folders.. But still when I try to build createsamples.cpp.. I am getting errors that I pasted below..Can anyone help me please?..

1>------ Build started: Project: haart, Configuration: Release Win32------ 
1>Compiling...
1>createsamples.cpp 1>c:\opencv\build\include\opencv2\flann\logger.h(66) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
1> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(237) : see declaration of 'fopen' 
1> C:\documents and settings\ee206922\my documents\visual studio 2008\projects\haart\haart\cvhaartraining.h(130) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
1> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\string.h(74) : see declaration of 'strcpy'
1>.\createsamples.cpp(138) : error C2065: 'CV_RANDOM_INVERT' : undeclared identifier
1>.\createsamples.cpp(184) : error C2065: 'CV_RANDOM_INVERT' : undeclared identifier
1>.\createsamples.cpp(203) : error C3861: 'cvCreateTrainingSamples': identifier not found
1>.\createsamples.cpp(214) : error C3861: 'cvCreateTestSamples': identifier not found
1>.\createsamples.cpp(226) : error C3861: 'cvCreateTrainingSamplesFromInfo': identifier not found
1>.\createsamples.cpp(235) : error C3861: 'cvShowVecSamples': identifier not found
1> Build log was saved at "file://c:\Documents and Settings\ee206922\My Documents\Visual Studio 2008\Projects\haart\haart\Release\BuildLog.htm" 1>haart - 6 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-02-12 02:32:11 -0600

CV_RANDOM_INVERT, cvCreateTrainingSamples, cvCreateTestSamples, cvCreateTrainingSamplesFromInfo and cvShowVecSamples are defined in cvharrtraining.h try to put the file in the same directory as other cpp.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-02-12 02:16:07 -0600

Seen: 1,309 times

Last updated: Feb 12 '13