Ask Your Question
0

is createsamples.exe removed from the latest windows opencv builds?

asked 2013-05-22 04:47:42 -0600

randomstuff gravatar image

updated 2013-05-22 05:57:00 -0600

hello,

i have decided to try and train my own haar database of some object and in my old opencv (changelog says OpenCV 1.0, October 18, 2006) i had a file called bin/createsamples.exe.

also, everyone online is referencing to file bin/opencv_createsamples.exe.

however, in the latest build that i've downloaded i can find no such thing. i can only find uncompiled .h and .cpp files under the apps directory.

have the pre-built excutables been removed from the latest opencv builds or did i download something wrong?

please excuse this nooby question

edit: this is terrible. with the hassle, i've been trying to compile the haar training files for an hour an half now. the includes are even wrong: the new version of opencv has no "highgui.h", or "cxcore.h" in main directory. they are now located in "opencv/highgui.h", etc. which is funny, because the same files including stuff just like "highgui.h" are also including "opencv2/core/core.hpp". meaning that they should be including "opencv/cxcore.h" instead of just "cxcore.h".

those files need cleaning

edit2: oh god, i am giving up. now there is another barrier- microsoft visual studio has a bug that makes incremental linking unfunctional. however, i can't compile the haar training cpp files without incremental linking. i am going to use the old exe from the old opencv from 2006

have there been any changes to the haar training files?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-05-23 00:19:18 -0600

vinayverma gravatar image

Hi,

I am using visual studio 2010 too, and didn't face any problem in compiling these files. I think you have not added one/some of the following paths to project:

  • C/C++ -> Additional Include Directories
  • Linker ->General: Additional Library Directories
  • Linker->Input: AdditionalDependencies

You can also add "opencv" directory to paths instead of changing things like "highgui.h" to "opencv/highgui.h" in code files.

After setting these, I am successfully able to build/execute all files like createsamples.cpp, haartraining.cpp etc.

edit flag offensive delete link more

Comments

no, i have every ilbrary added, i have already built a single opencv project- my own program. the problem with the haartraining cpp files is that there are multiple files at once. if i add them into a single project file- they have multiple main() functions- which of course results in conflict. if i add a single .cpp file into each separate project file- i get a linker error: 1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt . google says that this is a microsoft visual studio 2010 bug and i should either disable incremental linking or install VS service pack. now, if i disable incremental linking the .cpp file won't compile, as it needs to link other files from other files. and installing a whole servicepack just for this project is an overkill.

randomstuff gravatar imagerandomstuff ( 2013-05-23 12:24:15 -0600 )edit

Well, for sure we need to add only one file (say haartraining.cpp) to the project. I am doing the same and am able to use it.

vinayverma gravatar imagevinayverma ( 2013-05-24 02:42:22 -0600 )edit
1

that's because you have the visual studio 2010 version that doesn't include the linker error bug

randomstuff gravatar imagerandomstuff ( 2013-05-24 10:04:29 -0600 )edit

Ok..that might be the case then. I have not tried with different versions of visual studio.

vinayverma gravatar imagevinayverma ( 2013-06-05 01:01:06 -0600 )edit

Question Tools

Stats

Asked: 2013-05-22 04:47:42 -0600

Seen: 1,677 times

Last updated: May 23 '13