Trying to adapt mergevec to work with the new OpenCV (2.4.5) - opencv

So like the title says I've been following this tutorial which seems to be the go to tutorial for how to handle haar feature training using the OpenCV.
Mergevec is a utility that merged together vec files so that you could generate a large number of samples from relatively few images. Anyway, he has an exe but it appears to be for 32-bit OpenCV 2.4.3 while I have 64-bit version 2.4.5. Any help would be appreciated!
My version is built using cmake and Visual Studio 10 as the compiler

Figured it out! Hopefully others can make use of this too!
Basically you want to:
First add mergevec.cpp to the folder \opencv\apps\haartraining then add the following to CMakeLists.txt
# -----------------------------------------------------------
# mergevec
# -----------------------------------------------------------
add_executable(opencv_mergevec mergevec.cpp)
set_target_properties(opencv_performance PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
OUTPUT_NAME "opencv_mergevec")

Related

haartraining directory on opencv 3.0 to build mergevec

i currently developing object detection which requires creating my own object classifier. i stack on merging samples .vec using mergevec.cpp that i have to build mergevec by my self because it's not available for linux built. to build mergevec requires haartraining directory and library.
my question is, where is haartraining library on opencv 3.0 ? i couldn't find it. i have a narrow time to build another opencv version/downgrade to make it works
sorry for bad grammar, thank you for helping my problem
here is the mergevec that you need, now it is a .py
https://github.com/wulfebw/mergevec/blob/master/mergevec.py
if you need a tutorial:
https://github.com/wulfebw/mergevec
but if you are following the tutorial you should still use the mergevec of the first link I sent you, because the mergevec of the tutorial is faulty

Linking Header File with Main.Cpp file in Codeblocks

I am trying to use codeblocks to compile the code available here
The thing is every time I try to build and run, I run into the following error:
|/.../head_pose_estimation/opencv2/core/core.hpp|48|fatal error: opencv2/core.hpp: No such file or directory
Does anyone know how I can fix this? Thank you!
You do not have the pre-built (compiled) version of OpenCV, what you currently have are the source files. If you want to do something special with OpenCV (Target/GPU SUpport etc) then you will need to build the framework using an appropriate guide.
If however you simply want to use OpenCV in the most common way then download the pre-built libraries from the OpenCV.org website.
NOTE:
If you are using OpenCV with MinGW compiler, I do not remember if the pre-built is actually pre-built for MinGW. (I dont think they do) In this case you will HAVE to built the libraries. You can find a guide here

cannot setup Opencv 2.4.6 , opencv_core231d.lib Not Found Error

Hello everyone;
i had opencv 2.2 on my vs2010, and i wanted to update so i went to opencv site and:
i've downloaded OpenCV for Windows (ver 2.4.6)
i've extracted it to c:\opencv2.4
i've set the Environment Variable as doc said here: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#windowssetpathandenviromentvariable
( i didnt know what is "PATH EDITOR" so i've just changed Environment variables)
i made property sprite sheets as opencv doc said here: http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
5.but Doc Was Old, and there was no "include" folder in OpenCV2.4/opencv/build/x64/vc10 so I did set include Directory to OpenCV2.4/opencv/build/include in My property sprite sheet.
everything seems true and VS detect include libraries But
VS2010 throw following error when i want to Build the solution:
1>LINK : fatal error LNK1104: cannot open file 'opencv_core231d.lib'
Strange thing is there is no "opencv_core231d.lib" File in c:\opencv2.4 at all!!!
:(
what is the problem?
This is a Linker error, so make sure you are trying to link the correct libraries.
I would suggest to use CMake, which definitely simplifies configuring projects, specially those having dependencies like OpenCV (you can take a look to the OpenCV documentation, or any blog explaining the steps: http://marcosnietoblog.wordpress.com/2011/11/19/opencv-for-windows-easy-installation-using-cmake/ )
By the way, I use to have several versions of opencv on the same folder:
C:\OpenCV\opencv2.4.3
C:\OpenCV\opencv2.4.6
...
So I can easily switch within CMake setting the OpenCV_DIR.
opencv_core231d.lib is a debug version, all the *d.lib and *d.dll files in openCV are with debug symbols.
It is likely that the pre-built release you downloaded doesn't contain debug ones.
either download te source and build both debug and release. Or, if you don't care how opencv works internally, just change the linker flags to use the same lib names with the d
edit. or of course if you donwloaded opencv 2.4.6 the file would be opencv_core246d.lib

Using OpenCV with DevCPP

I am a newbie to OpenCV and I am trying to use it with DevC++. Although I am aware I could use Visual Studio for the same , I would still like to use DevC++.
The OpenCV Wiki-how seems obsolete with this information. Can you please tell me the steps with which I can modify the Compiler Options in DevCpp so that I may kick-off with OpenCV.
Any help is highly appreciated ...
Also, OpenCV wiki directs me to paste the following code in the Compiler Options ,
-L"C:\Program Files\OpenCV\lib" -lcxcore -lcv -lcvaux -lhighgui -lml -lcvcam
Sadly , I did not find the lib folder in my OpenCV directory..

opencv 2.4 really slow compared to pre-built 2.3 on iOS

I'm building openCV with either this script: https://github.com/BloodAxe/OpenCV-iOS-build-script, or this one: https://github.com/aptogo/OpenCVForiPhone.
Compared to their previous already built versions mine is really slow. The only thing I can see different is that in my case opencv is getting compiled with -O0.
Edit: I've tested it with phase correlation and lk and it's 5 times as slow.
Why don't you use cmake as the official documentation suggests?
Edit: make sure you're passing -DCMAKE_BUILD_TYPE=RELEASE to cmake.

Resources