segunda-feira, 16 de novembro de 2009

OpenCV the Computer Vision Library

Great library, but it is very hard to make it work on Visual Studio 2009. There is no default .lib for VS so you have to make them yourself.

These are the instructions from the file:

OpenCV-2.0.0a-win32.Readme.Please.txt

1. Download CMake from http://www.cmake.org/cmake/resources/software.html
   and install it.

2. Run CMake GUI tool and configure OpenCV there:
   2.1. select C:\OpenCV2.0 (or the installation directory you chose)
        as the source directory;
   2.2. choose some other directory name for the generated project files, e.g.
        C:\OpenCV2.0\vs2008, or D:\Work\OpenCV_MinGW etc.
   2.3. press Configure button, select your preferrable build environment
   2.4. adjust any options at your choice
   2.5. press Configure again, then press Generate.
3a. In the case of Visual Studio or any other IDE, open the generated
   solution/workspace/project ..., e.g. C:\OpenCV2.0\vs2008\OpenCV.sln,
   build it in Release and Debug configurations

3b. In the case of command-line Makefiles, enter the destination directory
    and type "make" (or "nmake" etc.)
4. Add the output directories to the system path, e.g.:
   C:\OpenCV2.0\vs2008\bin\Debug;C:\OpenCV2.0\vs2008\bin\Release:%PATH%
   It is safe to add both directories, since the Debug
   OpenCV DLLs have the "d" suffix, which the Release DLLs do not have.
5. Optionally, add C:\OpenCV2.0\include\opencv to the list of
   include directories in your IDE settings,
   and the output library directories
   (e.g. C:\OpenCV2.0\vs2008\lib\{Debug,Release})
   to the list of library paths.

One afternoon was lost with this, It would just be better if they gave all the compiled stuff from the beggining…

Sem comentários:

Enviar um comentário