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:
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 gitclone command to clone the remote repository.
It stores the SDK API reference documentation. The documentation is 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 APIs.
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.
TYVer.h: the header file for retrieving SDK version information.
TYParameter.h: the header file for the GenICam standard APIs.
TYDefs.h: the header file for Camport SDK data types.
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. Additionally, it also stores USB driver related files.
sample Directory
It contains subfolders including cloud_viewer, common, sample_v1, sample_v2 and sample_genicam_sfnc, where sample_v1, sample_v2 and sample_genicam_sfnc include sample programs provided for users to refer to when programming. For more details about the sample programs, please refer to Sample Program Descriptions.
Double click the downloaded .msi installer file and follow the wizard to complete the installation. Important: Select the option “Add CMake to PATH” during the installation process to configure system environment variables automatically.
Download and install Visual Studio . Important: During installation, select the Desktop development with C++ workload under the Desktop and Mobile Applications category.
If your application doesn’t require OpenCV’s image processing, you can skip its installation. To handle image display, a streamlined approach is to use the CImg library with the native Windows GDI interface.
The recommended OpenCV version is 4.5.5. Other versions are not tested and the compatibility is not guaranteed.
Double-click the downloaded .exe file to extract the contents, noting the extraction path.
After extraction, configure the OpenCV library path in the system environment variables.
Detailed steps: Access the Environment Variables dialog box, select the “Path” entry, and click Edit. In the Edit Environment Variables dialog box, add the OpenCV library path.
To use the USB camera, you need to install the USB driver.
Installation Steps for New USB cameras
Extract the usb_driver.zip archive located in “Camport4/lib/win/driver”.
Double-click install.bat to complete the installation.
Installation Steps for New USB cameras
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 PERCIPIODEVICEEE can be found, as shown in the following image:
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.
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.
Note
The following error will appear after clicking Finish .
Set TYCam_DIR to the path of TYCamConfig.cmake (usually located in the SDK root directory).
Configuring the BUILD_SAMPLE_WITH_GUI option.
To enable image display, check the BUILD_SAMPLE_WITH_GUI (this is the default setting). During compilation, the system will proceed in the following order:
It will first search for and use a locally installed OpenCV library for image display.
If OpenCV is not found, it will directly use the more lightweight Windows-native CImg library in conjunction with the GDI interface to achieve image display.
To disable image display, uncheck the BUILD_SAMPLE_WITH_GUI.
Check BUILD_SAMPLE_GENICAM_SFNC, BUILD_SAMPLE_V1 and BUILD_SAMPLE_V2, then click Configure.
To run the application in sample/sample_v2 with OpenCV image display support, check BUILD_SAMPLE_V2_WITH_OPENCV as well.
Click on Configure。
Click on Generate.
Click on Open Project to open the project in Visual Studio.
Note
Afterwards, the project can be opened with the Project.sln or ALL_BUILD.vcxproj file in the Camport4/sample/build folder.
Build Project: In Visual Studio Tool Bar, change the solution configuration to “Release” mode. In the Visual Studio menu bar, click on Build> Build Solution.
After connecting the depth camera to the computer, it will begin system initialization. Once the power indicator light stabilizes to a steady 1-second on, 1-second off blinking pattern, you can launch the executable file to retrieve depth maps:
For Windows10 X64 OS, run the executable file lib/win/hostapp/x64/sample_trigger.exe in the SDK package, then select “Continuous” mode to obtain depth maps.
Copy tycam.dll and tyimgproc.dll from the lib/win/hostapp/x64 directory to the build output folder (sample/build/bin/Release). Run sample_trigger.exe in this folder and select “Continuous” mode to obtain depth maps.