Install OpenCV on Windows with Choco
Install OpenCV on Windows with Choco 在 Windows 系统上安装 OpenCV
This article records how to install opencv on windows with choco
and use opencv in Visual Studio.
Install OpenCV
choco install opencv
My version is OpenCV 4.5.5, my installation path is C:/tools
Add PATH:
Use in Visual Studio
Reference: How to build applications with OpenCV inside the “Microsoft Visual Studio”
Add PATH
If opencv_world455d.lib
not found, probably you miss this step.
Ref: SOLVED: opencv_world451.dll was not found
Add Library and Includes
Set Additionary Library
In OpenCV 4.5.5, it should be opencv_world455d.lib
or opencv_world455.lib
if you want debug mode off.
It is the name of a file in lib
folder.
Test
The code is from Adding OpenCV 4.1.2 to Visual Studio 2019 Project in Windows using Pre-built binaries