-
-
Notifications
You must be signed in to change notification settings - Fork 745
Installation instructions Windows
Andrews Cordolino Sobral edited this page Mar 4, 2023
·
10 revisions
- OpenCV 2.4.x, 3.4.x, 4.x
- Visual Studio 2013, 2015, 2017 or newer
- CMake 3.12 or higher
- Open the Windows Command Prompt
- Run the following batch script:
Note that you may need to fix some paths related to your environment!
git clone --recursive https://github.com/andrewssobral/bgslibrary.git
cd bgslibrary
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
set OpenCV_DIR=C:\OpenCV\opencv-3.4.7\build
set BUILD_DIR=build_win_ocv347
set PATH=%PATH%;%OpenCV_DIR%\x64\vc15\bin
set PYTHONPATH=%PYTHONPATH%;%OpenCV_DIR%\python\cv2\python-3.7
if exist %BUILD_DIR% (
echo Removing existing folder
RMDIR /Q/S %BUILD_DIR%
)
mkdir %BUILD_DIR%
cd %BUILD_DIR%
cmake -DOpenCV_DIR=%OpenCV_DIR% -G "Visual Studio 16 2019" ..
:: If you want the Python Wrapper
:: cmake -DOpenCV_DIR=%OpenCV_DIR% -DBGS_PYTHON_SUPPORT=ON -DBGS_CORE_STATIC=ON -G "Visual Studio 16 2019" ..
:: The Python package will be generated at %BUILD_DIR%\pybgs.cp37-win_amd64.pyd
:: You also need to add it in your PYTHONPATH.
devenv bgslibrary.sln
cd ..
- Inside the MSVS2019 IDE you switch from Debug to Release and click on Build Solution (or CTRL + Shift + B)!
That's all!
Compiling BGSLibrary with Python support on Windows 10 and MSVS 2017
-
BGSLibrary with OpenCV 2.4.x and Visual Studio 2013 from CMAKE (Recommended)
-
BGSLibrary with OpenCV 3.2.0 and Visual Studio 2015 from CMAKE (Recommended)
-
BGSLibrary with Visual Studio 2010 and Opencv 2.4.x (Manually)
Prebuilt binaries can be downloaded from the latest build for the following configurations: