Start coding with OpenCV and VS2010 in no time

It’s usually very time-consuming to start a new project because you have to manually add the libs and include directories. And when there’s a lot of them. It’s a headache.

Fortunately CMake has made this a really easy step. You only create the CMakeLists.txt file where your project properties reside and CMake does the rest.

In this tutorial I’ll try to explain how to get up and running in no time with OpenCV and Visual Studio 2010.

First we’ll install OpenCV from the SVN repository and then we’ll create a Visual Studio project with the help of CMake.

A – Installing TortoiseSVN

If you’re unfamiliar with Version Control software you might not know that SVN helps you maintain revisions of your code. It’s like creating multiple backups of your project.

In windows, TortoiseSVN is the default utility for SVN. To install it :

  1. Go to TortoiseSVN downloads site and choose the right version for you.
  2. Follow the Installer instructions.

B – Installing CMake

  1. Grab the CMake Windows Installer.
  2. Follow the Installer instructions.

I – Grabbing the latest version of OpenCV from SVN

A simple way of doing this, based on the official Installation Guide :

  1. Go to the Folder where you want to download the sources. i ex. “C:\Libs”.
  2. Right click and choose “SVN checkout” from the Context Menu.
  3. Fill in the URL : “https://code.ros.org/svn/opencv/trunk”.
  4. Choose your checkout directory, for instance “C:\Libs\opencv”.
  5. Click OK. It should start downloading the sources.tortoiseCheckout

II – Creating the config files with CMake

CMake will create the necessary files to build the OpenCV sources with your favorite compiler. In our case, we’ll be using Visual Studio 2010 :

  1. Open CMake (cmake-gui).
  2. Choose the source code path ( Where you downloaded OpenCV ). i. ex. “C:\Libs\opencv”
  3. Choose the output directory ( Where to build the binaries ). i ex. “C:\Libs\opencv\vs2010″. Click Yes to create the directory if doesn’t exist.
  4. Click on the Configure button.
  5. Choose the compiler/IDE you want to use. In this case, choose Visual Studio 10. And leave the default native compiler active unless you have a reason not to.
  6. Choose the options you want to use. Such as Build Examples, build doxygen docs, etc.
  7. Click on the Configure button until all the conflicts are resolved ( all red lines change their color to white).
  8. Click Generate.
    CMakeGui

III – Building OpenCV

We’ll now proceed to build openCV with Visual Studio 2010.

  1. Open the Solution file located in the binaries directory. i. ex. “C:\Libs\opencv\vs2010\OpenCV.sln”
  2. Wait until all the files are completely loaded.
  3. Press F7 to build the Solution.
  4. That’s it ;).
    Building OpenCV

IV – Creating a Project for Visual Studio

The following instructions are based on the OpenCV page Getting Started.

  1. Create a directory for your project. i. ex. “C:\Projects\myFirstOpenCvTest”
  2. Add the following C++ file to the directory. Name it “main.cpp” :
    #include <cv.h>
    #include <highgui.h>
    
    int main ( int argc, char **argv )
    {
    // Create a window to show the image
    cvNamedWindow( "My Cool Window" );
    IplImage *img = cvCreateImage( cvSize( 300, 100 ), IPL_DEPTH_8U, 3 );
    
    double hScale = 1.0;
    double vScale = 1.0;
    double shear  = 0.0;
    int lineWidth = 2;
    
    // Initialize the font
    CvFont font;
    cvInitFont( &font, CV_FONT_HERSHEY_SCRIPT_COMPLEX, hScale, vScale, shear, lineWidth );
    
    // Write on the image ...
    CvScalar color = CV_RGB( 0, 51, 102 );
    cvPutText( img, "Hello World!", cvPoint( 60, 60 ), &font, color );
    
    // ... and show it to the world !
    cvShowImage( "My Cool Window", img );
    
    // Wait until the user wants to exit
    cvWaitKey();
    
    return 0;
    }
    
  3. Create the “CMakeLists.txt” file, don’t forget to use the real name of your project :
    SET( PROJECT_NAME project_name_goes_here )
    PROJECT( ${PROJECT_NAME} )
    CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
    FIND_PACKAGE( OpenCV REQUIRED )
    ADD_EXECUTABLE( ${PROJECT_NAME} main.cpp )
    TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${OpenCV_LIBS} )
    
  4. And let the magic of CMake do its trick :
    • Open CMake and choose as the source directory the directory where you have the main.cpp and the CMakeLists.txt file.
    • Follow the same steps as in II (Creating the config files with CMake).

V – Testing your project

  1. Open the Solution file of your project, located in the vs2010 directory.
  2. Press F7 to build it.
  3. In the Solution Explorer, right-click the name of your project/ Debug / Start new instance.
    You should see your Hello World text appear.
    myCoolWindowOpenCV

You now have a fully configured VS2010 – OpenCV project.

A piece of cake, wasn’t it ?

As a matter of fact. This procedure can easily be translated to almost any ide/compiler.

Questions and remarks are appreciated.

About these ads

46 comments on “Start coding with OpenCV and VS2010 in no time

  1. Hi,

    well just adding the Debug & Release directories didn’t work 4 me.

    I added cv.h to my project but it is it doesn’t know where to find them.

    I’ve added the lib/debug (/release) directories to the sys-path.

    Is there anything else I have to do?
    Thanks 4 the help

    • Hi Ted Mosby,
      Usually cmake does the work of configuring the project for you. What’s the error you’re getting and when ?
      BTW say hello to Barney ;)

      • Hi, I’m having the same problem as Ted.

        I thought that there is no need of adding the path to the system, isn’t it?

        The problem, is that when you run the executable it prompts that the opencv_core220(d).dll was not found (being d needed in debug and not needed in release)

        Any suggestion?

      • Did you try copying the dll files to the directory where your exe runs ? Or if you prefer add the directory that contains the dll to the path so your program can find them.

  2. Pingback: 2010 in review « Redkiing's Blog

  3. thanks for such a clear guide

    everything went fine until Step IV.3

    this is how the CMakeLists.txt i created

    PROJECT( MyFirstOpenCvTest )
    CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
    FIND_PACKAGE( OpenCV REQUIRED )
    ADD_EXECUTABLE( ${MyFirstOpenCvTest} main.cpp )
    TARGET_LINK_LIBRARIES( ${MyFirstOpenCvTest} ${OpenCV_LIBS} )

    i got errors at lines 4 and 5 they are

    4.add _executable called with incorect number of arguments
    5.can not specify link libraries for target “debug” which is not buit by this project.

  4. thanks Anunay,
    try :
    ADD_EXECUTABLE( MyFirstOpenCvTest main.cpp )
    TARGET_LINK_LIBRARIES( MyFirstOpenCvTest ${OpenCV_LIBS} )
    let me know what you get

  5. thanks for answering but now i am having more problems new error:

    “Error in cofiguration process, project files may be invalid”

    i tried both “MyFirstOpenCvTest ${OpenCV_LIBS}” and previous method but not working.

    can you tell me what should i type in
    “Where is the source code”&”Where to build the binaries”.

    thank you

  6. output of build step III:-

    1>
    1>Build FAILED.
    1>
    1>Time Elapsed 00:00:00.16
    3>—— Skipped Build: Project: uninstall, Configuration: Debug Win32 ——
    3>Project not selected to build for this solution configuration
    4>—— Build started: Project: ALL_BUILD, Configuration: Debug Win32 ——
    4>Build started 17-01-2011 11:21:04.
    4>InitializeBuildStatus:
    4> Creating “Win32\Debug\ALL_BUILD\ALL_BUILD.unsuccessfulbuild” because “AlwaysCreate” was specified.
    4>CustomBuild:
    4> Building Custom Rule C:/OpenCV2.2/CMakeLists.txt
    4> CMake is re-running because C:\OpenCV2.2\VS2010\CMakeFiles\generate.stamp dependency file is missing.
    4>CUSTOMBUILD : CMake error : The source “C:/OpenCV2.2/CMakeLists.txt” does not match the source “C:/Projects/myFirstOpenCvTest/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.
    4> The system cannot find the batch label specified – VCReportError
    4>
    4>Build FAILED.
    4>
    4>Time Elapsed 00:00:01.22
    5>—— Skipped Build: Project: PACKAGE, Configuration: Debug Win32 ——
    5>Project not selected to build for this solution configuration
    6>—— Skipped Build: Project: INSTALL, Configuration: Debug Win32 ——
    6>Project not selected to build for this solution configuration
    ========== Build: 0 succeeded, 2 failed, 99 up-to-date, 4 skipped ==========

    output of IV.4:-
    Error in configuration process, project files may be invalid

    CMake Error at CMakeLists.txt:4 (ADD_EXECUTABLE):
    add_executable called with incorrect number of arguments

    CMake Error at CMakeLists.txt:5 (TARGET_LINK_LIBRARIES):
    Cannot specify link libraries for target “debug” which is not built by this
    project.

  7. after some time i tried again then i did not know where to put the
    “where to build the binaries”
    as you said
    “1.Open the Solution file of your project, located in the vs2010 directory.”

    can you elobrate more from IV.3 and IV.4

  8. You’re getting those errors because ${MyFirstOpenCvTest} is not defined. CMake will behave as if you had only passed one parameter, and thus it can’t execute ADD_EXECUTABLE nor TARGET_LINK_LIBRARIES.

    I’ve updated the CMake code to make it less ambiguous. You should try it and it should give you no more problems.

    For your project, the source directory is located at “C:\Projects\myFirstOpenCvTest”. You can put the binaries at “C:\Projects\myFirstOpenCvTest\vs2010″. Then, Configure, Generate and you should have a valid VS solution in the binaries folder.

  9. i made the projct mfocv and made the checklist
    SET( mfocv mfocv )
    PROJECT( ${mfocv} )
    CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
    FIND_PACKAGE( OpenCV REQUIRED )
    ADD_EXECUTABLE( ${mfocv} main.cpp )
    TARGET_LINK_LIBRARIES( ${mfocv} ${OpenCV_LIBS} )

    and saved it in the same dirctry as the main.cpp
    when i ran cmake it gave this error

    CMake Error: The source “E:/Alis documents/My Dropbox/Visual Studio 2010/Projects/mfocv/mfocv/CMakeLists.txt” does not match the source “C:/Program Files/OpenCV2.1/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.

  10. Thanks, adding the dirs to the path solve it.

    I thought it wasn’t needed. Is there anyway of doing it without adding dirs to the path besides copying the files to the directory?

  11. What about the libraries: cxcore200.lib and cv200.lib? I’m working on a project that uses those (in fact it uses ONLY those, other than highgui.lib), and rebuilding the libraries doesn’t generate them . I tried just using the libs that it provides, in case the libs names had been changed in the latest version or something, but then I get linker errors saying it can’t find the functions I’m calling. The reason I wanted to try rebuilding them is because the project generates a strange runtime error when running in x64, but runs fine in win32. I’m running windows 7 64-bit. So anyway, what’s the deal with these libs/dlls? Do they not exist anymore? What about all the functions that depended on them? (Like cvCreateImage, or cvReleaseImage)

    • Another point, I just tried using the new opencv_highgui229d.lib instead of the old highgui200.lib, and it also has problems finding the functions (such as cvWriteFrame, cvConvertImage)

  12. OpenCV 2.2 is organized in different modules : core, imgproc, ml, etc … Many function names have also changed. It is also more C++ stylish and so many functions have their names changed by replacing the cv prefix with the cv:: namespace. Keeping the C++ approach, many classes have been created to regroup similar functionalities. For instance cv::Mat for matrices and images. VideoWriter for writing images which, by the way, you can use instead of cvWriteFrame.

    So far I know OpenCV didn’t break backwards compatibility so your project should still compile. Did you try creating a CMake file for your project ? It should automatically compile and link the libs you need.

  13. When performing the final step, the Debug Output displayed:

    ‘Test.exe': Loaded ‘C:\OpenCV2.3\vs2010\Debug\Test.exe’, Symbols loaded.
    ‘Test.exe': Loaded ‘C:\Windows\System32\ntdll.dll’, Cannot find or open the PDB file
    ‘Test.exe': Loaded ‘C:\Windows\System32\kernel32.dll’, Cannot find or open the PDB file
    ‘Test.exe': Loaded ‘C:\Windows\System32\KernelBase.dll’, Cannot find or open the PDB file
    ‘Test.exe': Loaded ‘C:\OpenCV2.3\bin\opencv_core230d.dll’, Cannot find or open the PDB file
    The program ‘[1680] Test.exe: Native’ has exited with code -1072365566 (0xc0150002).

    Any clue why? I didn’t force the configuration manager (within solution properties menu) to build the ALL_BUILD project, so that project was skipped.\

    Thanks

    • Your program might have a hard time finding the dll’s it needs. Try running ‘Test.exe’ directly from the windows explorer, you should get a more informative error.

  14. I’m having a problem in “IV-4″, ass when I press the “Configure” button on CMake 2.8.2, I get the following error:

    CMake Error: The source “C:/Projects/myFirstOpenCvTest/CMakeLists.txt” does not match the source “C:/Libs/opencv/opencv/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.

    How can I solve this issue?

    Thanks.

  15. Did you try re-running CMake with a different source directory ?
    Or, deleting the generated cache might help too.

  16. I have followed the above and all builds fine in VS2010. However, when I try to run the sample program I get an error…

    ‘The application was unable to start correctly (0xc0150002)’

    I have tried several ways to install OpenCV now, and all result in this error, even when I try to run a blank ‘main’ program. The only thing that solves it is getting rid of the #includes as well (not very useful).

    Any ideas ?

  17. Hi Rodrigo,
    My build fails (only 1 of them) in Debug mode as well as in release mode. I followed the steps that you had outlined with SVN updated 5th Sep 2011 and vs 2010 on 64 bit win7 machine. Please suggest what could be wrong?

    4>Build started 06-Sep-2011 9:17:47 AM.
    5>—— Skipped Build: Project: uninstall, Configuration: Debug Win32 ——
    5>Project not selected to build for this solution configuration
    4>InitializeBuildStatus:
    4> Touching “example_stitching.dir\Debug\(EXAMPLE) stitching.unsuccessfulbuild”.
    4>CustomBuild:
    4> All outputs are up-to-date.
    4>ClCompile:
    4> All outputs are up-to-date.
    4>ManifestResourceCompile:
    4> All outputs are up-to-date.
    4>stitching.obj : error LNK2019: unresolved external symbol “public: void __thiscall cv::Blender::prepare(class std::vector<class cv::Point_,class std::allocator<class cv::Point_ > > const &,class std::vector<class cv::Size_,class std::allocator<class cv::Size_ > > const &)” (?prepare@Blender@cv@@QAEXABV?$vector@V?$Point_@H@cv@@V?$allocator@V?$Point_@H@cv@@@std@@@std@@ABV?$vector@V?$Size_@H@cv@@V?$allocator@V?$Size_@H@cv@@@std@@@4@@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “class cv::Rect_ __cdecl cv::resultRoi(class std::vector<class cv::Point_,class std::allocator<class cv::Point_ > > const &,class std::vector<class cv::Size_,class std::allocator<class cv::Size_ > > const &)” (?resultRoi@cv@@YA?AV?$Rect_@H@1@ABV?$vector@V?$Point_@H@cv@@V?$allocator@V?$Point_@H@cv@@@std@@@std@@ABV?$vector@V?$Size_@H@cv@@V?$allocator@V?$Size_@H@cv@@@std@@@4@@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: static class cv::Ptr __cdecl cv::Blender::createDefault(int,bool)” (?createDefault@Blender@cv@@SA?AV?$Ptr@VBlender@cv@@@2@H_N@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: static class cv::Ptr __cdecl cv::SeamFinder::createDefault(int)” (?createDefault@SeamFinder@cv@@SA?AV?$Ptr@VSeamFinder@cv@@@2@H@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: void __thiscall cv::ExposureCompensator::feed(class std::vector<class cv::Point_,class std::allocator<class cv::Point_ > > const &,class std::vector<class cv::Mat,class std::allocator > const &,class std::vector<class cv::Mat,class std::allocator > const &)” (?feed@ExposureCompensator@cv@@QAEXABV?$vector@V?$Point_@H@cv@@V?$allocator@V?$Point_@H@cv@@@std@@@std@@ABV?$vector@VMat@cv@@V?$allocator@VMat@cv@@@std@@@4@1@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: static class cv::Ptr __cdecl cv::ExposureCompensator::createDefault(int)” (?createDefault@ExposureCompensator@cv@@SA?AV?$Ptr@VExposureCompensator@cv@@@2@H@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: static class cv::Ptr __cdecl cv::Warper::createByCameraFocal(float,int,bool)” (?createByCameraFocal@Warper@cv@@SA?AV?$Ptr@VWarper@cv@@@2@MH_N@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “void __cdecl cv::waveCorrect(class std::vector<class cv::Mat,class std::allocator > &)” (?waveCorrect@cv@@YAXAAV?$vector@VMat@cv@@V?$allocator@VMat@cv@@@std@@@std@@@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “class std::vector<int,class std::allocator > __cdecl cv::leaveBiggestComponent(class std::vector<struct cv::ImageFeatures,class std::allocator > &,class std::vector<struct cv::MatchesInfo,class std::allocator > &,float)” (?leaveBiggestComponent@cv@@YA?AV?$vector@HV?$allocator@H@std@@@std@@AAV?$vector@UImageFeatures@cv@@V?$allocator@UImageFeatures@cv@@@std@@@3@AAV?$vector@UMatchesInfo@cv@@V?$allocator@UMatchesInfo@cv@@@std@@@3@M@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl cv::matchesGraphAsString(class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > &,class std::vector<struct cv::MatchesInfo,class std::allocator > &,float)” (?matchesGraphAsString@cv@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@3@AAV?$vector@UMatchesInfo@cv@@V?$allocator@UMatchesInfo@cv@@@std@@@3@M@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: virtual void __thiscall cv::BestOf2NearestMatcher::releaseMemory(void)” (?releaseMemory@BestOf2NearestMatcher@cv@@UAEXXZ) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: void __thiscall cv::FeaturesMatcher::operator()(class std::vector<struct cv::ImageFeatures,class std::allocator > const &,class std::vector<struct cv::MatchesInfo,class std::allocator > &)” (??RFeaturesMatcher@cv@@QAEXABV?$vector@UImageFeatures@cv@@V?$allocator@UImageFeatures@cv@@@std@@@std@@AAV?$vector@UMatchesInfo@cv@@V?$allocator@UMatchesInfo@cv@@@std@@@3@@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: __thiscall cv::BestOf2NearestMatcher::BestOf2NearestMatcher(bool,float,int,int)” (??0BestOf2NearestMatcher@cv@@QAE@_NMHH@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: virtual void __thiscall cv::SurfFeaturesFinder::releaseMemory(void)” (?releaseMemory@SurfFeaturesFinder@cv@@UAEXXZ) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: void __thiscall cv::FeaturesFinder::operator()(class cv::Mat const &,struct cv::ImageFeatures &)” (??RFeaturesFinder@cv@@QAEXABVMat@1@AAUImageFeatures@1@@Z) referenced in function _main
    4>stitching.obj : error LNK2019: unresolved external symbol “public: __thiscall cv::SurfFeaturesFinder::SurfFeaturesFinder(bool,double,int,int,int,int)” (??0SurfFeaturesFinder@cv@@QAE@_NNHHHH@Z) referenced in function _main
    4>stitching.obj : error LNK2001: unresolved external symbol “private: virtual void __thiscall cv::HomographyBasedEstimator::estimate(class std::vector<struct cv::ImageFeatures,class std::allocator > const &,class std::vector<struct cv::MatchesInfo,class std::allocator > const &,class std::vector<struct cv::CameraParams,class std::allocator > &)” (?estimate@HomographyBasedEstimator@cv@@EAEXABV?$vector@UImageFeatures@cv@@V?$allocator@UImageFeatures@cv@@@std@@@std@@ABV?$vector@UMatchesInfo@cv@@V?$allocator@UMatchesInfo@cv@@@std@@@4@AAV?$vector@UCameraParams@cv@@V?$allocator@UCameraParams@cv@@@std@@@4@@Z)
    4>stitching.obj : error LNK2001: unresolved external symbol “private: virtual void __thiscall cv::BundleAdjuster::estimate(class std::vector<struct cv::ImageFeatures,class std::allocator > const &,class std::vector<struct cv::MatchesInfo,class std::allocator > const &,class std::vector<struct cv::CameraParams,class std::allocator > &)” (?estimate@BundleAdjuster@cv@@EAEXABV?$vector@UImageFeatures@cv@@V?$allocator@UImageFeatures@cv@@@std@@@std@@ABV?$vector@UMatchesInfo@cv@@V?$allocator@UMatchesInfo@cv@@@std@@@4@AAV?$vector@UCameraParams@cv@@V?$allocator@UCameraParams@cv@@@std@@@4@@Z)
    4>C:\Libs\opencv\vs2010\bin\Debug\stitching.exe : fatal error LNK1120: 18 unresolved externals
    4>
    4>Build FAILED.

  18. keep getting Error 1 error LNK1104: cannot open file ‘C:\Libs\opencv\vs2010\lib\Debug\opencv_calib3d233d.lib’ C:\Projects\myFirstOpenCvTest\LINK project_name_goes_here
    any idea on how to fix it.

    • Your error might be caused by “spaces” in your path. Remove them and give it a try.
      BTW project_name_goes_here means you should give a name to your project ;)

  19. This might be stupid question, but it puzzled me!
    So I have everything running fine and I can see the “Hello World” message, but if I want to create a new or a different project it will fail?
    Could you please direct me in what I need to do in creating a new project or file?

    Thanks in advance

    • Simply create your file as you usually do and don’t forget to add a reference to it in your CMakeLists.txt (the ADD_EXECUTABLE line)

      • CMake Error at CMakeLists.txt:5 (ADD_EXECUTABLE):
        Cannot find source file:

        main.cpp

        Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
        .hxx .in .txx

        I did create main.cpp in VS2010 when I created my new project!?

        Thanks again for your time and help

  20. Hey Red King thanks for the help, building OpenCV has been a little tricky for me and reading the book kind of sucks when you can’t start writing code
    I understand everything up to selecting your CMake key, value options. I looked at the OpenCV docs and found this info about CMake options of utilizing GPU and Qt here:

    http://opencv.willowgarage.com/wiki/VisualC%2B%2B

    but it looks like you’ve choosen a bunch more options than I knew about.
    How did you get these? Are they all listed somewhere in one place?
    How many are necessary? important?

  21. Step IV.4, should I be setting the Source and Build directories as the directories of the CMakeLists.txt and main.cpp files of my program, or should the Build Directory be the OpenCV directory?

    I am having an error where the All_Build file is getting lost and is causing an error when I try to run a new instance.

    • “Step IV.4, should I be setting the Source and Build directories as the directories of the CMakeLists.txt and main.cpp files of my program”

      Yes.
      – source directory: contains your main.cpp + CMakeLists.txt files
      – build directory: should be any other folder, preferably an empty one

  22. Pingback: OpenCV with MS Visual Studio | 3Asuper

  23. Pingback: YauB » OpenCV: Installation

  24. Hello and thinks for the tutorial, i have a problem when i use trotoisesvn to install OpenCv, it displays a box authentication (admin and password)! can you help me and thank you again.

  25. Hi. Thanks for the instructions.
    i have generated the code with cmake successfully
    but im getting …
    ->fatal error LNK1104: cannot open file ‘C:\Users\Dell\Documents\Visual Studio 2010\Cmake bin dir\lib\Debug\opencv_calib3d243d.lib’

    please help..
    Where is the solution file of my project located?
    and how can i test it?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s