Permalink
Please sign in to comment.
Browse files
Fixed VS2010 project.
Added instructions for compiling with CMake in Windows. Added Demo2.cpp in CMakeLists.txt
- Loading branch information...
Showing
with
2,094 additions
and 162 deletions.
- +6 −1 CMakeLists.txt
- +83 −0 README_CMAKE_USERS.txt
- +0 −1 build/.gitignore
- +0 −1 build/README
- +287 −0 cmake-modules/FindOpenCV.cmake
- +1 −1 run_camera.bat
- +1 −1 run_video.bat
- +16 −0 vs2010/.gitignore
- +6 −3 vs2010/README.txt
- +10 −11 vs2010/bgslibrary.sln
- +1 −131 vs2010/bgslibrary.vcxproj
- +1 −12 vs2010/bgslibrary.vcxproj.user
- +241 −0 vs2010/bgslibrary_demo.vcxproj
- +596 −0 vs2010/bgslibrary_demo.vcxproj.filters
- +4 −0 vs2010/bgslibrary_demo.vcxproj.user
- +241 −0 vs2010/bgslibrary_demo2.vcxproj
- +596 −0 vs2010/bgslibrary_demo2.vcxproj.filters
- +4 −0 vs2010/bgslibrary_demo2.vcxproj.user
| @@ -0,0 +1,83 @@ | ||
| +------------------------------------------------- | ||
| +-------------- WINDOWS CMAKE USERS -------------- | ||
| + | ||
| +How to build BGSLibrary with OpenCV 2.4.10 and Visual Studio 2010 from CMAKE. | ||
| + | ||
| +For Linux users, please see the instruction in README_LINUX_USERS.txt file. | ||
| + | ||
| +Dependencies: | ||
| +* GIT (tested with git version 2.7.2.windows.1). | ||
| +* CMAKE for Windows (tested with cmake version 3.1.1). | ||
| +* Microsoft Visual Studio (tested with VS2015). | ||
| + | ||
| +Please follow the instructions below: | ||
| + | ||
| +1) Go to Windows console. | ||
| + | ||
| +2) Clone BGSLibrary git repository: | ||
| +e.g.: git clone https://github.com/andrewssobral/bgslibrary.git | ||
| + | ||
| +3) Go to bgslibrary/build folder. | ||
| +e.g.: C:\bgslibrary\build>_ | ||
| + | ||
| +2) Set your OpenCV PATH: | ||
| +e.g.: | ||
| +\> setlocal | ||
| +\> set OpenCV_DIR=C:\OpenCV2.4.10\build | ||
| +\> cmake -DOpenCV_DIR=%OpenCV_DIR% -G "Visual Studio 10" .. | ||
| +or: | ||
| +\> cmake -DOpenCV_DIR=%OpenCV_DIR% -G "Visual Studio 10 Win64" .. | ||
| + | ||
| +Now, you will see something like: | ||
| +------------------------------------------------- | ||
| +C:\bgslibrary\build>cmake -DOpenCV_DIR=C:\OpenCV2.4.10\build -G "Visual Studio 10" .. | ||
| +-- The C compiler identification is MSVC 16.0.40219.1 | ||
| +-- The CXX compiler identification is MSVC 16.0.40219.1 | ||
| +-- Check for working C compiler using: Visual Studio 10 2010 | ||
| +-- Check for working C compiler using: Visual Studio 10 2010 -- works | ||
| +-- Detecting C compiler ABI info | ||
| +-- Detecting C compiler ABI info - done | ||
| +-- Check for working CXX compiler using: Visual Studio 10 2010 | ||
| +-- Check for working CXX compiler using: Visual Studio 10 2010 -- works | ||
| +-- Detecting CXX compiler ABI info | ||
| +-- Detecting CXX compiler ABI info - done | ||
| +-- OpenCV ARCH: x86 | ||
| +-- OpenCV RUNTIME: vc10 | ||
| +-- OpenCV STATIC: OFF | ||
| +-- Found OpenCV 2.4.10 in C:/OpenCV2.4.10/build/x86/vc10/lib | ||
| +-- You might need to add C:\OpenCV2.4.10\build\x86\vc10\bin to your PATH to be able to run your appl | ||
| +ications. | ||
| +-- Configuring done | ||
| +-- Generating done | ||
| +-- Build files have been written to: E:/GitHubbkp2/bgslibrary_opencv2/build | ||
| +C:\bgslibrary\build> | ||
| +------------------------------------------------- | ||
| + | ||
| +3) Include OpenCV binaries in the system path: | ||
| +\> set PATH=%PATH%;%OpenCV_DIR%\x86\vc10\bin | ||
| +or: | ||
| +\> set PATH=%PATH%;%OpenCV_DIR%\x64\vc10\bin | ||
| + | ||
| +4) Open 'bgs.sln' in Visual Studio and switch to 'RELEASE' mode | ||
| +4.1) Note if you are using a Visual Studio version superior than 10, you will need to CANCEL the project wizard update. However, you can go to step (2) and change the Visual Studio version, e.g.: -G "Visual Studio XXX", where XXX is your Visual Studio version. | ||
| + | ||
| +5) Click on 'bgs' project, and set: | ||
| +[Configuration Type] Static library (.lib) | ||
| +[Target Extension] .lib | ||
| + | ||
| +6) Click on 'ALL_BUILD' project and build! | ||
| + | ||
| +7) If everything goes well, you can run bgslibrary in the Windows console as follows: | ||
| + | ||
| +7.1) Running BGSLibrary with a webcamera: | ||
| +C:\bgslibrary> build\Release\bgs.exe --use_cam --camera=0 | ||
| + | ||
| +7.2) Running demo code: | ||
| +C:\bgslibrary> build\Release\bgs_demo.exe dataset/video.avi | ||
| + | ||
| +7.3) Running demo2 code: | ||
| +C:\bgslibrary> build\Release\bgs_demo2.exe | ||
| + | ||
| +Additional information: | ||
| +* Note that bgslibrary requires a 'config' folder in the working directory. | ||
| +e.g.: C:\bgslibrary\config |
| @@ -1 +0,0 @@ | ||
| -FOR LINUX USERS |
Oops, something went wrong.
0 comments on commit
b3e9154