Picking The Right OpenCV Build For Windows - opencv

I'm trying to make heads and tails of the list of files available for Windows at OpenCV's website.
This is the list at SourceForge (http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3/) for v2.3:
OpenCV-2.3.0rc-gpu-support-win32-vs2008.zip
OpenCV-2.3.0rc-win64-vs2010.exe
OpenCV-2.3.0rc-win32-vs2008.exe
OpenCV-2.3.0rc-win-src.zip
I've deduced the following so far:
OpenCV-2.3.0rc-gpu-support-win32-vs2008.zip: The only way to get support for using GPUs.
OpenCV-2.3.0rc-win64-vs2010.exe: Used if you are using Visual Studio 2010 and 64-bit Windows
OpenCV-2.3.0rc-win32-vs2008.exe: Used if you are using VS 2008 and 32-bit Windows
OpenCV-2.3.0rc-win-src.zip: Source code for OpenCV on Windows (but might not support GPUs).
I'm left with the following questions (assuming that I don't want to compile from the source code):
Which version should I pick if want to use Visual Studio 2008, OpenCV, and a 64-bit version of Windows?
Which version should I pick for Visual Studio 2010, OpenCV, and 32-bit Windows?

If you notice the filenames they contain the letters rc which stand for release candidate. I would not recommend using this version just yet. Grab OpenCV 2.2 if you don't need specific features from the 2.3.
There's a README file on that page explaining what's inside each package. All v2.2 packages are 32-bit.
Which version should I pick if want to use Visual Studio 2008, OpenCV, and a 64-bit version of Windows?
You will have to rebuild OpenCV from the sources. Download OpenCV-2.2.0-win.zip or OpenCV-2.3.0rc-win-src.zip for the 2.3 version.
Which version should I pick for Visual Studio 2010, OpenCV, and 32-bit Windows?
For the 2.3 version, you will also have to rebuild OpenCV from the sources, OpenCV-2.3.0rc-win-src.zip. For the 2.2 version, there's the package OpenCV-2.2.0-win32-vs2010.exe, which includes OpenCV source code, documentation, samples and pre-compiled 32-bit binaries.

Related

MSVCP140.dll missing in VS2013 + Win7

I am trying to install OpenCV 3.2.0 and run CannyStill.cpp according to the following instructions.
Installation Cheat Sheet 1 - OpenCV 3 and C++.pdf
I am using VS2013 plus Win7.
I have set the Runtime Library to /MTd.
I have installed VC++ 2015 Redistributables.
but the problem is not going away.
How can I solve the issue?
The problem is that your OpenCV was compiled with another Visual Studio compiler (2015). With the redistributables you will get the release version of the dll, but not the debug one. The error is complaining about
MSVCP140D.dll
which is for debuging.
Possible solutions
You can recompile OpenCV (why is not compiled with the same visual studio in the first place?) with VS2013 and use that one.
Install VS2015 and use that one.
Compile it and run it in release mode.
Choose whichever suits you :)

Why can't I start WampServer in Windows 2003 server sp2?

here is a problem I meet. I download and installed WampServer, it could not be started. After clicking, it started without any error message but ended immediately because
there was an WampServer icon in the right-down corner (just besides input icon and time) and disappeared within less than 1 second automatically. No process of wamp can be found when using ctrl+alt+del.
I suppose there is no problem in wampserver software itself since it can be installed in other computers successfully. Previous searching indicated I need to install visual C++ 2008 and 2010 but it seems still the same.
I am going crazy about this for a few days. Many thanks for you if there can be any suggestion or some similar cases.
Please make sure you have the latest version of all of these Microsoft C/C++ Redistributable runtime libraries. You dont need the whole compiler, just these C/C++ runtime libraries.
The 2008 Redist (32bit) is used by wampmanager even if you installed the 64bit WAMPServer.
The 2010 Redist is used by some versions of Apache ( depending on compiler used ).
The 2012 Redist is used by some versions of Apache ( depending on compiler used ).
FOR WAMP 32bit
Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)
If you are using WampServer2.4/2.5 32bit and therefore Apache 2.4.x
Microsoft Visual C++ 2012 is required
And select vcredist_x86.exe
FOR WAMP 64bit
Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
>> Yes you need the x86 Package regardless as wampmanager uses this <<
Microsoft Visual C++ 2008 Redistributable Package (x64)
Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)
If you are using WampServer2.4/2.5 64bit
Microsoft Visual C++ 2012
And select vcredist_x64.exe
the authors state directly on the download page (http://www.wampserver.com/en/):
Wampserver 2.5 is not compatible with Windows XP, neither with SP3,
nor Windows Server 2003
When I tried it, during the install I get the odd, cryptic error popups such as "bin\apache\apache2.4.9\bin\httpd.exe is not a valid Win32 application".
I would recommend doing the manual approach for Win2K3 platforms - sure it's a lot more work, but you can follow an excellent, precise step-by-step recipe here:
http://www.ricocheting.com/how-to-install-on-windows/apache
I've done this approach a dozen times with no complications. If you've never done the "old school way" before, it's a good learning experience. And it would probably be a lot faster overall than struggling with trying to get WampServer working on Win2K3 OS.
Note that in both cases, you'll still need to first install VC 2008 redistributable package (as mentioned above).

Porting OpenCV on WinCE07 platform

I have created a HOG based human detection code using OpenCV. While the code is runs well on my Windows 7 system, I now need to port this on a WinCE07 platform. How do I compile OpenCV for WinCE07 platform.
OpenCV site has instruction to build OpenCV from source, see "Installation in Windows - Installation by Making Your Own Libraries from the Source Files".
Basically you need:
A suitable development environment for Windows CE (some years ago the environment was eMbedded Visual C++ 4.0, I do not know what Microsoft has now).
The source code of OpenCV.
CMake, it is the program for managing the build. CMake will create the projects and solutions files. Usually CMake automatically recognize your development environment.

ImageMagick with Visual Studio

I'm trying to write a sample ImageMagick program in Visual Studio 2010. I have binary distribution of ImageMagick already installed on my system as I can use command line interface of ImageMagick.
However, when I try to include "Magick++.h" in my C++ program, it says it can't open source file.
I found the instructions on compiling and building ImageMagick from source, but is it possible to change my visual studio project settings so it can pick necessary references/libraries from the already installed version of ImageMagick?
I am by no means an expert, but here is what worked for me:
Using Windows7 Professional and Visual C++ Express 2010...
I checked the Install development headers and libraries for C and C++
At the end of the install, I got these two folders. Magick++.h lies inside include.
Be sure to set up your projects Additional Library Locations and Additional Include Directories and you should be able to compile your program.
Additionally:
The manual suggests you need to do this for your program to work, but I did not and it still worked:
InitializeMagick(path_to_ImageMagick_DLLs);
And during my brief test, I found that Magick::Image::Magick() which changes image formats does not work in Debug mode. It does work in Release mode though.

Setting up OpenCV 2.4.3 & Microsoft Visual Studio 2012 ( Win8 x64 )

I want to configure opencv with Visual Studio 2012 on Windows 8 x64.
I configured opencv and there is no compilation errors, but when I execute my program I get this error :
The program can’t start because MSVCR100D.dll is missing from your
computer
I tried to install Visual C++ Redistributable for Visual Studio 2012 and Microsoft Visual C++ 2010 Redistributable Package (x64) but always the same error.
If it's still relevant, try this tutorial to create project and configure OpenCV directories:
http://karanjthakkar.wordpress.com/2012/11/21/usin-opencv-2-4-2-with-visual-studio-2012-on-windows-7-64-bit/
It worked for me on Windows 8 (x64) with Visual Studio 2012 and OpenCV 2.4.3.
After configuring the paths and libraries in Visual Studio as mentioned in http://karanjthakkar.wordpress.com/2012/11/21/usin-opencv-2-4-2-with-visual-studio-2012-on-windows-7-64-bit/ you need to install the Visual C++ Redistributable for Visual Studio 2012 from http://www.microsoft.com/en-us/download/details.aspx?id=30679
After restarting your PC, opencv code could be executed in Release mode. If you need to execute the code in Debug mode, then you would have to install the Redistributable version with "D".
This worked with Opencv 2.4.6, Windows 8.1 and VS 2012 Desktop.
Without having any experience with Windows 8 myself, I think this post could solve your problem.
Basically it says that the default system folder for Win 8 is c:\windows\system, unlike c:\windows\system32 on earlier systems. The redistributables probably install to the old system directory, so you have to move the dll to the correct folder manually.
You could also search the file on your PC and put it into the working folder of your program. This is in most cases the output folder, if you run it in Debug mode from VS it can also be the project folder.

Resources