Getting started¶
Download¶
- Navigate to the repository
- On the landing page select your desired OpenCV version
Or use following release table
Version | Build-Info | All Build-Configurations | Examples |
---|---|---|---|
4.12.0 ( latest) | link | ||
4.11.0 | link | ||
4.10.0 | link | ||
4.9.0 | link | ||
4.8.0 | link | ||
4.7.0 | link | ||
4.6.0 | link | ||
4.5.5 | link | ||
4.5.4 | link |
The precompiled libraries are attached as assets compressed in zip archives to the bottom of the page.
Please check the Build-Info for the included OpenCV modules
Success
- Downloaded one or more archives e.g.:
MSVC142_64.zip
. - Downloaded the corresponding
Examples.zip
of the release.
Unpack the archives¶
If you completed the task, proceed as follows to this project setup
.
├─ vs2015/ # -> From Examples.zip - Directory containing project files (organize source code files and other resources) for Visual Studio 2015
├─ vs2017/ # -> From Examples.zip - Directory containing project files (organize source code files and other resources) for Visual Studio 2017
├─ vs2019/ # -> From Examples.zip - Directory containing project files (organize source code files and other resources) for Visual Studio 2019
├─ vs2022/ # -> From Examples.zip - Directory containing project files (organize source code files and other resources) for Visual Studio 2022
├─ MSVC140_32/ # -> From MSC140_32.zip - Directory containing the prebuilt libraries and header files for Visual Studio 2015 targeting 32-bit
├─ MSVC140_64/ # -> From MSC140_64.zip - Directory containing the prebuilt libraries and header files for Visual Studio 2015 targeting 64-bit
├─ MSVC140_32/ # -> From MSC141_32.zip - Directory containing the prebuilt libraries and header files for Visual Studio 2017 targeting 32-bit
├─ MSVC140_64/ # -> From MSC141_64.zip - Directory containing the prebuilt libraries and header files for Visual Studio 2017 targeting 64-bit
├─ MSVC142_32/ # -> From MSC142_32.zip - Directory containing the prebuilt libraries and header files for Visual Studio 2019 targeting 64-bit
├─ MSVC142_64/ # -> From MSC142_64.zip - Directory containing the prebuilt libraries and header files for Visual Studio 2019 targeting 64-bit
├─ MSVC143_32/ # -> From MSC143_32.zip - Directory containing the prebuilt libraries and header files for Visual Studio 2022 targeting 32-bit
├─ MSVC143_64/ # -> From MSC143_64.zip - Directory containing the prebuilt libraries and header files for Visual Studio 2022 targeting 64-bit
├─ .gitattributes # Can be ignored.
├─ .gitignore # Can be ignored.
└─ README.md # Can be ingored.
Build Examples¶
The project setup¶
Place for holding the Visual Studio Examples source code is following git repository
In every directory there is solution file with Examples_<vs_compiler_name>.sln
and other directories holding the wanted examples, required project, configuration and resource files. For e.g. vs2019 the directory-file-tree looks like that
.
├─ vs2019/
│ ├─ 0_HelperScripts/* # Contains required helper projects e.g. copying files
│ ├─ 1_Print_Version/* # Contains project files and source code for this example
│ ├─ 2_Image_Read_and_Display/* # ~
│ ├─ 3_Image_Webcam_Read_and_Display/* # ~
│ ├─ 4_Image_Webcam_Canny_Detection/* # ~
│ ├─ OpenCV_PropertySheet/* # Contains the property sheet for easy including the required compile and linking dependencies
│ ├─ res/* # Contains required files for specific examples.
│ └─ Examples_vs2019.sln # The solution file including and organizing all the example projects
Using Visual Studio IDE ¶
Please make sure that you have the correct/any build tools installed.
Open the Examples_<vs_compiler_name>.sln
with the required IDE version.
If everything was correctly placed (unpacked), no error popup will appear .
For further help checkout the FAQ or create an issue.
And it will look this snapshot using VS 2019 IDE.
Click Examples_<vs_compiler_name>
and choose Build Solution
or simply use the shortcut Ctrl+Shift+B to build all examples.
Success
Output Directory
The output layout follows this scheme
.
└─ _out_/
└─ <architecture>/ # x64 or x86
└─ <build configuration>/ # Debug, Release or RelWithDebInfo
└─ <All the examples>/* # binares and ressources