HOW TO INSTALL openCV in Win7 -64-bit - windows

I am facing problem in installing openCV in Win7 -64bit, and i need to know how to do it?
i have downloaded http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3.1/
131mb file from here and it doesnt contain any exe file, it contains some cmake file.
Help me.
Thanks,
sumit

Assuming you are using Visual Studio, after extracting the files to a location like c:\OpenCV-2.3.1\ you should setup a new project and link OpenCV libraries.
A couple of months ago I wrote a detailed tutorial explaining how to setup projects using Visual Studio 2010 in a 64bit machine. You can find the tutorial here.

I am surprised that you are not having trouble with your entire windows breaking down/slowing down. Please read this http://answers.opencv.org/question/3996/cannot-do-anything-with-opencv-anymore-on-windows/
If you are NOT having the same problem, I would love to hear how you managed to setup OpenCV to work with Visual Studio 2010 (or Visual C++ 2010 Express) on Windows 7 64-bit machine.
Once again, sorry that I technically unable to post it as a comment because I know that it is not ACTUALLY an answer.

I've written a blog post which can help you with the installation. It includes detailed steps, right from adding the dll's to the PATH variable, to running a simple program. Hope it helps!

I am not sure what are your situation about, I can download a .exe from that page directly. The whole 131mb file is an exe file.
You may try this direct link.

Related

How to install PCL on Visual Studio

I am new in Point Cloud Library and I would like to know how can I install it on my computer. I have already installed PCL 1.6.0 and Microsoft Visual Studio 2010 but I can't manage to use PCL. I understand that I am supposed to set references at some point but I am totally clueless as how and when I should do it.
I have been trying to follow the instructions at http://unanancyowen.com/?p=1255&lang=en but when I get to :
Set the environment variable for PCL and 3rdParty.
Variable Name Variable Value
PCL_ROOT C:\Program Files\PCL 1.7.2(or C:\Program Files (x86)\PCL 1.7.2)
Path ;%PCL_ROOT%\bin
;%PCL_ROOT%\3rdParty\FLANN\bin
;%PCL_ROOT%\3rdParty\VTK\bin
I am totally lost...
I have never used neither Visual Studio nor PCL before.
I am using windows7 64bits
If you could hint me in the right direction or direct me to a tutorial that I could understand, that would be very helpfull !!
Thanks in advance!
Your PCL version is not right...I use PCL 1.7.2 and VS2012 on Win8.1, and it's the same on win7.
Look at this tutorial(It's in chinese and you can use google translate, I follow it and succeed to run PCL1.7.2 on my VS2012):
I used the website you mentioned to install pcl in my computer. And it works just fine. And quite detailed compared to other tutorials. From your question, I understand that you have trouble adding the path to the environment variables. If thats not what you are having trouble with, let me know.
The environment variable helps the visual studio compiler to find the paths to PCL libraries during run time. So, after installing PCL, we need to tell the computer where we have installed pcl and pcl bin files and the supporting 3rd party libraries. You do that by editing the path.
As for how to set the environment variable, go through this tutorial: http://www.computerhope.com/issues/ch000549.htm

Windows 7, 64 bit, DLL problems

I have a problem with our executable. I'm running this C++ 32-bit executable on my Windows 7 64-bit development box that also has all those Microsoft applications (Visual Studio 2008 + 2010, TFS, SDK, Microsoft Office)...
And it's still running just fine.
Now I got the client installation of the very same program and was asked to test it with a clean Windows 7 installation. Thus I got one Windows 7 64-bit VMware and updated it to Windows 7 SP 1 (the very same version my developer box is tuning).
But while on my developer box everything is fine the program does not work with the VMware (30 days trial) box.
The x86 Dependency Walker is telling me that the following DLL files are missing:
API-MS-WIN-CORE-COM-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-0.DLL
DCOMP.DLL
GPSVC.DLL
IESHIMS.DLL
I googled for those API-MS-WIN-... DLL files and found they should actually already be part of Windows 7 (some sites claiming the belong to Windows 8 and Windows Server 2012 though).
I already tried the suggested fixes I found, which are:
running 'sfc /scannow'
installing Visual Studio 2008 SP1 runtime executables
But that didn't solve anything. :-(
Side note: My development box does not have them either, and does not seem to need them. For example, the user32.dll on my box does not link against one of those, while the installation on the VMware does.
Any idea on how to fix this issue?
I tried to find a suitable download / fix on the Microsoft pages, but I failed.
After solving my issue I wanted to report what I found out, and I can't post this as an answer because the question has been closed.
Actually all the DLL files reported missing by the Dependency Walker tool, namely those
* API-MS-WIN-CORE-...
type DLL files were not part of the actual problem.
In my case the registration of three OCX files was missing and after that everything was just fine, BUT Dependency Walker tool still listed all the very same DLL files as before even when the program was just running fine now.
The gist of it: As someone elsewhere stated, the tool is a bit dated by now and does not always work properly with a newer OS. Thus keep an eye open and don't get mislead by missing 'API-MS-WIN-CORE-COM-L1-1-0.DLL', ... the problem probably lies entirely elsewhere.
This problem is related to missing the Visual Studio "redistributable package." It is not obvious which one is missing based on the dependency walk, but I would try the one that corresponds with your compiler version first and see if things run properly:
Visual Studio 2015
Visual Studio 2013
Visual Studio 2010
Visual Studio 2008
I ran into this problem because I am using the Visual Studio compilers, but not the full Visual Studio environment.
Going to dare to inject a new link here: The latest supported Visual C++ downloads. Stein Åsmul, 29.11.2018.
I just resolved the same problem with C++ Qt 5 and Windows 7 64 bits with MSCVC 2012.
In the beginning I thought it was a MSVC/Windows DLL file problem, but as BorisP said, the problem was in my project dependencies. The key is "How to know your project dependencies in Qt 5?".
As I didn't find any clear way to know it (Dependency Walker didn't help me a lot...), I followed next the "inverse procedure" that takes no more than 5 minutes and avoid a lot of headaches with DLL file dependencies:
Compile your project and take the executable file to an empty folder: myproject.exe
Try to execute it, It will retrieve an error (missing DLL files...).
Now, copy all the DLL files from Qt (in my case they were in C:\Qt\Qt5.1.1\5.1.1\msvc2012_64_opengl\bin) to this folder.
Try to execute again, it will probably works fine.
Start to delete progressively and try every time your executable still works, trying to leave the minimum necessary DLL files.
When you have all the DLL files in the same folder it is easier to find which of them are not valid (XML, WebKit, ... whatever..), and consequently this method doesn't take more than five minutes.
I just resolved the same problem.
Dependency Walker is misleading in this case and caused me to lose time. So, the list of "missing" DLL files from the first post is not helpful, and you can probably ignore it.
The solution is to find which references your project is calling and check if they are really installed on the server.
#Ben Brammer, it is not important which three .ocx files are missing, because they are missing only for Leo T Abraham's project. Your project probably calls other DLL files.
In my case, it was not three .ocx files, but missing MySQL connector DLL file. After installing of MySQL Connector for .NET on server, the problem disappeared.
So, in short, the solution is: check if all your project references are there.
As mentioned, DCOMP is part of the VC++ redistributables (implementing the OpenMP runtime) and is the only truly missing component. All the rest are false reports.
Specifically API-MS-WIN-XXXX.DLL are API-sets - essentially, an extra level of call indirection introduced gradually since Windows 7. Dependency Walker development seemingly halted long before that, and it can't handle API sets properly.
So there is nothing to worry about there. You're not missing anything more.
A better alternative to find the truly needed DLL files that are missing (if that is indeed the problem) is to run Process Monitor and step backwards from the failure, searching for sequences of failed probes for a specific DLL file in all the system path.
I also ran into this problem, but the solution that seems to be a common thread here, and I saw elsewhere on the web, is "[re]install the redistributable package". However, for me that does not work, as the problem arose when running the installer for our product (which installs the redistributable package) to test our shiny new Visual Studio 2015 builds.
The issue came up because the DLL files listed are not located in the Visual Studio install path (for example, C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist) and thus had not been added to the install. These api-ms-win-* dlls get installed to a Windows 10 SDK install path as part of the Visual Studio 2015 install (e.g. C:\Program Files (x86)\Windows Kits\10\Redist).
Installing on Windows 10 worked fine, but installing on Windows 7 required adding these DLL files to our product install. For more information, see Update for Universal C Runtime in Windows which describes the addition of these dependencies caused by Visual Studio 2015 and provides downloads for various Windows platforms; also see Introducing the Universal CRT which describes the redesign of the CRT libraries. Of particular interest is item 6 under the section titled Distributing Software that uses the Universal CRT:
Updated September 11, 2015: App-local deployment of the Universal CRT is supported. To obtain the binaries for app-local deployment, install the Windows Software Development Kit (SDK) for Windows 10. The binaries will be installed to C:\Program Files (x86)\Windows Kits\10\Redist\ucrt. You will need to copy all of the DLLs with your app (note that the set of DLL files are necessary is different on different versions of Windows, so you must include all of the DLL files in order for your program to run on all supported versions of Windows).
This contribution does not really answer the initial question, but taking into account the hit-rate of this thread I assume that there are quite a few people dealing with the problem that API-MS-WIN-CORE- libraries cannot be found.
I was able to solve a problem where my application refused to start with the error message that API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL is not found by simply updating Visual Studio.
I don't think that my build environment (Windows 7 Pro SP1, Visual Studio Ultimate 2012) was messed up completely, it worked fine for most of my projects. But under some very specific circumstances I got the error message (see below).
After updating Visual Studio 11 from the initial CD-Version (I forgot to look up the version number) to version 11.0.61030.00 Update 4 also the broken project was running again.
This solved the issue for me:
Uninstall the Visual Studio 2010 redistributable package if you have it installed already, and then install Microsoft Windows 7 SDK.
I solved the problem. When I registered the OCX files, I ran it with the Command Window that had been executed as an administrator.
For anybody who came here, but with a Photoshop problem: my solution was to uninstall the MS VC++ redistributable first x86 and 64 both. Then install one appropriate to the Windows version and architecture (86 or 64).
Installation of SQL Server Management Studio 2014 on a freshly installed Windows 7 resolved this problem at our client after a two-day ridiculous battle.
I came here with this problem occurring, after trying a fresh Windows 7 OEM install, upgrading to Windows 10.
After some searching of Microsoft forums and such I found the following solution which worked for me:
Replace C:\Windows10Upgrade\wimgapi.dll with the one from C:\Windows\System32\wimgapi.dll
I suggest also checking how much memory is currently being used.
It turns out that the inability to find these DLL files was the first symptom exhibited when trying to run a program (either run or debug) in Visual Studio.
After over a half hour with much head scratching, searching the web, running Process Monitor, and Task Manager, and depends, a completely different program that had been running since the beginning of time reported that "memory is low; try stopping some programs" or some such. After killing Firefox, Thunderbird, Process Monitor, and depends, everything worked again.
I had the same problem. After spending hours searching on the web, I found a solution for me.
I copied the file combase.dll file (C:\Windows\System32) to the release folder, and it resolved the problem.
Just to confirm answers here, my resolution was to copy the DLL that was not loading AND the ocx file that accompanied it to the system32 folder, that resolved my issue.

opencv 2.4.2 Configuration with Visual Studio 2010 issue?

Recently I decided to make a switch from OpenCV 2.1 to Opencv 2.4. I am having problems in configuring it with opencv. The details are as follows:-
Installed and extracted opencv in folder( opencv2.4).
Created a new folder "BIN" inside (opencv2.4). Used CMAKE to extract all data in BIN.
While using CMAKE I did not select QT, TBB, IPP options.
I added path to System environment i.e. C:\opencv2.4\build\x64\vc10\bin;
I used the solution in "BIN" folder and compiled first with Debug and then with Release options.
Now I started a new VS2010 project.
In project properties; C++ -> General
In project properties;Linker-> General I did
In project properties;Linker-> Input I did
I finally copied all .dll files in my debug folder.
When I run program, I am getting following error.
I dont know what wrong I am doing. Somehow I think I am not linking the library properly. Plz guide me in this regard . . .
There are extensive tutorials coming with the official OpenCV installation. They explain in great detail, with a lot of screenshots, how you configure Visual Studio with OpenCV. You can read the documentation online. I'll link the two tutorials relevant to this question:
Installation in Windows
http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html
How to build applications with OpenCV inside the Microsoft Visual Studio
http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html
You miss the opencv_legacy242.. lib. Add it and try again. Some functionality has moved to legacy in latest release
You may also try follow videos on this subject. They help a lot. Those from a reliable source of course. I know there's one on opencv.org website.

Building Compact Framework applications with VS2010 (without VS2005)

I want to perform a .NET CF 2.0 build using VS2010. I know it's not supported "normnally," but I've seen this answer: ( .NET Compact Framework with Visual Studio 2010? ) ...and I want to use that approach.
The blog post cited there says I need to modify the .csproj files for the .NET CF projects, to point to a particular Microsoft.CompactFramework.Common.targets . But I don't have that file.
I figured I needed to install the Windows Mobile 6 Standard SDK to get it.
I tried installing it and get this:
I have seen this question:
Windows Mobile 6 Standard SDK Refresh install issue on Visual Studio 2010 Professional Beta 2
I don't think the solution proposed there is workable for me. I do not have VS2008. I do not have VS2005. I have only VS2010, and I have no installable media for those other products.
I have also tried the administrative install (msiexec /a), but the resulting directory structure doesn't contain any files like Microsoft.CompactFramework.Common.targets .??
Q1:
Is there a way for me to install WM6 Standard SDK?
Q2: Anyone know the reg key that it looks for to determine if I have the appropriate pre-reqs?
Is this going to work if I just fiddle with my registry?
Q3: Is my assumption wrong? Really I want the Microsoft.CompactFramework.Common.targets file and its friends. Where can I get this? (I have no existing VS2008 machine to suck from)
Q4: Another approach I can think of is getting an eval version of VS2008, installing that into a VM, then installing the WM6 Std SDK there, then grabbing the Microsoft.CompactFramework.Common.targets file from that. Long way round. Is this gonna work and is it worth the trouble?
ANSWER
Here's the answer.
It is possible to build CF apps with VS2010, as outlined in Joel Fjorden's blog post. There are pre-requisites you need, in order to make this happen.
I believe the only official way to get the required files, including Microsoft.CompactFramework.Common.targets , Microsoft.CompactFramework.CSharp.targets , Microsoft.CompactFramework.VisualBasic.targets and Microsoft.CompactFramework.Build.Tasks.dll , is to install the related version of Visual Studio. These files are all version-specific, so to get the files for building for .NET CF 2.0, you need to install VS2005, and for .NET CF 3.5 you need to install VS2008. Installing VS2010 gives you neither. It works to use eval versions of the tools. It worked for me anyway.
If you are willing to go custom, you can simply copy these files from a working installation of VS2005 or VS2008 (or both), into the appropriate .NET directory, usually something like C:\Windows\Microsoft.NET\Framework\v2.0.50727 (change the version as appropriate). Chris Tacke has helpfully posted a link to the files you need. I don't know if copying these files violates the license for VS20?? , I am not a licensing expert.
You cannot get these files from the Windows Mobile SDK, as far as I can tell. Even so, you might still want a version-specific mobile SDK to get the emulators and skins and so on.
This is a basic "build" capability. It works but it doesn't give you designer support, debugging capability, built-in project templates, and so on. My advice to anyone who wants to do forward development on .NET CF is to use the tools that are geared toward those tasks - VS2005 or VS2008.
Thanks to Chris Tacke for posting a link for the files.
Not sure if it's any help, but the CF targets files from VS2008 can be found here. Let us know if you make any progress.
The "Power Toys for .NET Compact Framework" package (currently found at http://www.microsoft.com/en-us/download/details.aspx?id=13442) also contains the required files.
Thought I'd leave that here since it's an official Microsoft download.

How to build CppUnit with Visual Studio 2010

I am trying to build CppUnit (first line in ReadMe says version 1.13) with Visual Studio 2010. Following the instructions (found on web forums, couldn't find much in CppUnit documentation); I cannot find a valid file extension. All file extensions end with ",v" what is this weird ",v" extension and what is the purpose of it?
I am frustrated at this point, if someone can help with how to load CppUnit in VS2010 project and build it....that would be a great help !
Are you referring to this project?
http://sourceforge.net/projects/cppunit
If so, use TortoiseSVN for example to get the latest code from svn:
https://cppunit.svn.sourceforge.net/svnroot/cppunit
It contains "INSTALL-VS.Net2008.txt" with instructions for Visual Studio 2008 but it can also be applied to Visual Studio 2010.
You may have to edit src\msvc6\testrunner\MsDevCallerListCtrl.cpp and replace
version("9.0")
with
version("10.0")
You can safely ignore any build errors as long as the sln outputs cppunit(d).lib or whichever dependencies you need.
Have fun! :)
I've successfully converted CPPUNIT 1.12.1 to be a VS2010 solution. It's described here: http://blogs.powersoft.ca/erict/archive/2012/02/21/cppunit-in-vs2010ndashwith-a-sample.aspx and the solution can be downloaded from there.
I just found a version which is really easy to build in VS2010(aka push 1 button):
http://www.comp.nus.edu.sg/~cs3215/tools/cppunitAll.html
It's really nice because it has a .sln file which you can open directly. Also it includes a tutorial ;)
Found it with google.de
It's version 1.12.1
Have fun!

Resources