- 27 Oct 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Building Sample Code for VizionSDK on Windows
- Updated on 27 Oct 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Introduction
We are working on this article to ensure the contents are correct.
This article will explain how to build sample code for VizionSDK on Windows.
VizionSDK on Windows can provide useful function for our UVC Cameras. Below list shows all camera we can support.
- VCI-AR0144
- VCI-AR0234
- VCI-AR0521
- VCI-AR0522
- VCI-AR0821
- VCI-AR1335
You can download the Sample code on Windows from here.
Prerequisites
Before you begin, ensure that you have the following prerequisites installed on your system:
- Visual Studio 2017 or later
- OpenCV (version 3.4.16 or later)
Start to Build
This is an example to demonstrate how to build the sample code on Windows.
In the example, we use Visual Studio 2022 and OpenCV 3.4.16 to build the project.
- Create a new empty project for C++ and configure your project, like below figures.
- Add VizionSmaple.cpp to Project.
Right-click on Project in Solution Explorer -> Add -> Existing Item... -> Select "VizionSample.cpp" & "VizionSDK.h"
- Add necessary OpenCV libraries.
a. Right-click on Project in the Solution Explorer -> Properties
b. Navigate to the "Configuration Properties" section and select "C/C++".
c. Click on "Additional Include Directories" and add the path to the OpenCV include folder (e.g., C:\opencv\include).
d. Navigate to the "Linker" section and select "General".
e. Click on "Additional Library Directories" and add the path to the OpenCV library folder (e.g., C:\opencv\lib).
f. Navigate to the "Linker" section and select "Input".
g. Click on "Additional Dependencies" and add the necessary OpenCV libraries.
Run Build button to build the sample code.
After that, add VizionSDK.dll and OpenCV dll to the directory of the sample program. (In Debug case, there is debug dll)
Connect our UVC Camera, then run the program.