1

I'm using OpenCV 2.3 with visual studio 2010 ultimate the OpenCV works well with me, but when I call cvtColor function , I can't run the project and this error dialogue appear

"The application was unable to start correctly (0xc000007b). click OK to close the application."

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
Lighten.Jo0oe
  • 31
  • 1
  • 5
  • Is `cvtColor` the only non-working function? Look at [this question](http://stackoverflow.com/questions/2488123/devil-causes-program-to-be-unable-to-start-correctly). Most likely you are trying to use 32bit dlls in 64bit exe. – Piotr Praszmo Jan 31 '12 at 15:06
  • no there are many non-working function unfortunately , but what to do with the dlls ? the dlls of opencv is in it's folder bin-debug and i had put the path of these dlls in the environment variable while i was setying-up opencv – Lighten.Jo0oe Jan 31 '12 at 16:31
  • [How to configure Visual Studio 2010 to use OpenCV 2.3 C++](http://stackoverflow.com/questions/7011238/opencv-2-3-c-visual-studio-2010/7014918#7014918) – karlphillip Jan 31 '12 at 18:55
  • @karlphillip thank you , but i need the 64 bit steps , is it diffrent ? – Lighten.Jo0oe Feb 01 '12 at 13:55
  • Maybe the names of the libraries are , but the overall procedure is the same. – karlphillip Feb 01 '12 at 14:04

2 Answers2

2

I found the right way to install the OpenCV 2.3 Visual Studio 2010 in Windows 7 64 bit at "Getting Started with OpenCV 2.3 in Microsoft Visual Studio 2010 in Windows 7 64-bit".

Jeromy French
  • 11,812
  • 19
  • 76
  • 129
Lighten.Jo0oe
  • 31
  • 1
  • 5
  • [Using OpenCV 2.4.2 with Visual Studio 2012 on Windows 7 (64-bit)](http://karanjthakkar.wordpress.com/2012/11/21/usin-opencv-2-4-2-with-visual-studio-2012-on-windows-7-64-bit/) – Karan Thakkar Nov 21 '12 at 11:53
1

This sounds like it is likely a missing DLL problem. The cvtColor function is contained in the opencv_imgproc231.dll library. You'll either need to place this DLL in the same directory as the executable, or append the OpenCV DLL path (e.g., %OPENCV_ROOT%\install\bin) to the Path variable. Also note, if you changed your Path variable while Visual Studio was open, you will need to restart Visual Studio for it to see the change.

If the above fails, and you used the binary distribution, consider rebuilding OpenCV from source. If a binary distribution was built for VS2008, it will not work with VS2010 and vice versa. Here is a tutorial on how to build OpenCV from source on Windows.

mevatron
  • 13,911
  • 4
  • 55
  • 72