Tuyang Camera—windows- C# SDK (official website download and compile)

1. Installation dependencies:

  1. Cmake:
    Cmake official website download address: https://cmake.org/download/download
    insert image description here
    and that’s it, double-click to open and install

insert image description here

2. Download swig and SDK:

swig download link: https://www.swig.org/

https://www.swig.org/download.html
insert image description here

Download the C# SDK

Download from the download center of Percipio official website: https://www.percipio.xyz/downloadcenter/ .
Use the git command to obtain a local copy: open the terminal, switch to the working directory where the SDK needs to be stored, and enter the git clone command to clone the remote warehouse.

git clone https://github.com/alphaliang/pcammls.git

Download the Windows Campport3 SDK

Download from the download center of Percipio official website: https://www.percipio.xyz/downloadcenter/ .

Use the git command to obtain a local copy: open the terminal, switch to the working directory where the SDK needs to be stored, and enter the git clone command to clone the remote warehouse.

git clone
https://github.com/percipioxyz/camport3.git

3. Configure C# and swig environment variables

Before compiling, please: install Python. Install NumPy and OpenCV.

pip install numpy
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple

Configure Swig environment variables:

Right-click this computer, select Properties > Advanced System Properties > Environment Variables, and add the local SWIG executable file path to the Path of the system variable on the Environment Variables page
insert image description here

four compile

1. Open pcammls and modify cmakelists.txt,

Modify the local path of camport3, the compiled target language (CSHARP) and the local .NET version, and the local path of SWIG in the file
! [Insert picture description here](https://img-blog.csdnimg.cn/0211b15e042e4ce6bf53f1e9f40efc11.pnginsert image description here

2. Enable cmake-gui

Specify the source code directory to pcammls, specify the compiled output directory to pcammls/build, click Configure, select the Visual Studio version and X86/X64 version settings, and click Generate.

insert image description here
insert image description here
After clicking Open Project to open the project, select Release in the Visual Studio menu bar and click Generate > Generate Solution
! [Insert picture description here](https://img-blog.csdnimg.cn/5218e0369def4e5f877b9ab3051f16f2.pnginsert image description here

sample - needs to be installed
insert image description here

Link: https://pan.baidu.com/s/1eSeQTCYPwKiBJLV9L0Z4Gg Extraction code: jehe

Five, post-compilation test,

After compiling, copy the dynamic library tycam.dll in the camport3/bin/win/hostapp/x64 directory of the camport3 SDK to the pcammls/csharp_build_x64/Bin/Release directory, open Windows PowerShell and run the generated executable file.

insert image description here

6. Error message repair

1. The compiler cannot find opencvsharp4

Modify the CMAKELIST.txt under csharp, and comment the use of opencv.
insert image description here

Guess you like

Origin blog.csdn.net/jiyanghao19/article/details/131065607