C++ (Windows Platform)
Windows SDK supports X86 (32-bit) and X64 (64-bit) hardware platforms, and provides driver files for Windows 7 and above operating systems. Windows SDK includes some executable applications (such as viewing depth maps) and sample programs for some applications.
The following is an example of setting up the development environment for Percipio depth camera on Windows platform, using Windows 10 64-bit system:
Download Camport3 SDK
Choose any of the following methods to download Camport3 SDK :
Access https://github.com/percipioxyz/camport3.git using a browser and download the Camport3 SDK.
Use the git command to obtain a local copy: Open the terminal, switch to the working directory where the SDK should be stored, and enter the
git clone
command to clone the remote repository.git clone https://github.com/percipioxyz/camport3.git
The directory structure of Camport3 SDK is shown in the following figure:

Camport3 SDK Directory Structure
Doc Directory
It stores the SDK API reference documentation. The documentation is a PDF
file generated by Doxygen and includes descriptive information about classes, structures and interfaces.
include Directory
It stores the header files used to call dynamic libraries:
TYImageProc.h
: the header file for the image post-processing function interfaces.TYCoordinateMapper.h
: the header file for mapping of image space transformation.TY_API.h
: the header file for configuring the depth camera and obtaining image data. Users can develop their own applications based on these APIs.
lib/linux Directory
It stores library files which support Linux operating system and are compatible with AArch64, ARMv7hf, RaspberryPi, i686 and x86-64 hardware platforms.
lib/win Directory
It stores library files which support the Windows operating system and are compatible with x64 and x86 hardware platforms.
sample Directory
It contains two subfolders, sample_v1
and sample_v2
, both of which include sample programs provided for users to refer to when programming. For more details about the sample programs, please refer to Sample Program Descriptions.
Note
The sample programs in sample_v2
add convenient camera control interfaces on the basis of sample_v1
and provide the option of whether to depend on OpenCV or not.
Install USB Driver
When you are using a USB camera, installing the USB driver is necessary for compiling and running the Camport SDK.
After connecting the Percipio depth camera to a Windows PC using a USB cable, right-click on the Start in the bottom left corner of the desktop and click on Device Manager in the Start menu. In Device Manager, an unrecognized USB device
PERCIPIO DEVICEEE
can be found, as shown in the following image:Unrecognized USB Device
Right-click on the device and select Update driver. Choose the driver from the
lib/win/driver
directory in the Camport3 SDK according to the Windows version of your PC, and follow the system prompts to complete the driver installation.Camport3 Device Driver
After successful installation of the driver, you can find the Percipio Device
in the Device Manager.

Percipio Device
Install Dependencies
CMake
CMake is a powerful, cross-platform tool tailored for software compilation. It streamlines the build process by enabling developers to define the build procedure in a platform-agnostic way through straightforward statements. CMake is capable of producing a range of makefiles or project files, facilitating the testing of C++ features supported by the compiler, akin to automake in UNIX environments. Notably, CMake’s configuration file is distinctively named CMakeLists.txt. Unlike directly assembling the final software, CMake’s primary role is to generate standardized build files, such as Makefiles for UNIX or projects/workspaces for Windows Visual C++, which are subsequently compiled using alternative tools.
The Camport SDK utilizes CMake to build standard projects. By harnessing the native build systems’ capabilities across different platforms, it can seamlessly adapt to a wide range of platform environments.
Note
Camport SDK requires users to install CMake 2.8.0 or higher versions.
OpenCV
Camport SDK can receive depth data output from Percipio depth cameras via a USB interface or an Ethernet interface. After obtaining the depth data, the sample programs provided in Camport SDK use the OpenCV image processing library to render the depth data. Before compiling the sample programs, it is necessary to install the OpenCV graphics processing library.
Note
Camport SDK requires users to install OpenCV 2.4.8 or higher versions.
If the target application does not use OpenCV for image display or other image processing calculations, there is no need to install OpenCV.
Compile Sample Programs
Before compiling, please:
Install Visual Studio.
Note
When installing Visual Studio, you need to select the Visual C++ library module for installation as well, otherwise compilation will not be successful.
If you do not know how to install the Visual C++ library, you can contact Percipio technical support.
To compile the sample programs, do the following:
Create a directory named
build
in the SDK sample directory.Start cmake-gui.
Specify the source code directory as sample and the output directory for compilation as
sample/build
.Click on Configure, select your version of Visual Studio, and click on Finish.
Select the Sample you need to compile.
In the OpenCV_DIR column, specify the path to
opencv/build
.

Configure the path to the OpenCV library in the system environment variables.
Specific steps: Enter Edit environment variables dialog box, select the Path column and click on Edit, and configure the path of the OpenCV library in the Edit environment variables dialog.

Select BUILD_SAMPLE_V1.

Click on Generate.
Click on Open Project to open the project.
sample_v1 Sample Programs
sample_v2 Sample Programs
Note
Afterwards, the project can be opened with the
Project.sln
orALL_BUILD.vcxproj
file in thecamport3/sample/build
path.
Run Sample Programs
After connecting to the computer, the depth camera will initiate system initialization. Once the power indicator on the camera begins blinking at a frequency of 1Hz, you can get the depth maps by running the executable file lib/win/hostapp/x64/SimpleView_FetchFrame.exe
in the development package in the Windows 10 X64 system.
Alternatively, you can copy tycam.dll
from the development package lib/win/hostapp/x64
directory to the folder sample/build/bin/Release
generated by the compilation, and run SimpleView_FetchFrame.exe
in the folder to capture the depth maps.