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.
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 generates 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.
TYApi.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 such as cloud_viewer, common, sample_v1, sample_v2, and sample_genicam_sfnc. The sample_v1, sample_v2, and sample_genicam_sfnc folders include sample programs for development reference. The sample programs in the sample_genicam_sfnc folder are developed based on the SDK 4.X.X version that complies with the GenICam standard and are only applicable to cameras compatible with that SDK version.
Double-click the downloaded .msi installer and follow the wizard to complete installation. Important: Select “Add CMake to PATH” during installation so system environment variables are configured 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 usb_driver.zip from Camport4/lib/win/driver.
Double-click install.bat to complete the installation.
Installation Steps for Legacy USB Cameras
After connecting the Percipio depth camera to a Windows PC using a USB cable, right-click the Start in the bottom left corner of the desktop and click Device Manager in the Start menu. In Device Manager, an unrecognized USB device PERCIPIODEVICEEE is found, as illustrated in the following image:
Right-click the device and select Update driver. According to your Windows version, choose the driver under the “Camport4/lib/win/driver” path, then follow the prompts to complete installation.
Create a directory named build in the SDK sample directory.
Start cmake-gui.
Set the source directory to sample and the build output directory to sample/build.
click Configure, select your version of Visual Studio, and click 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.
Note
To run the application in sample/sample_v2 with OpenCV image display support, check BUILD_SAMPLE_V2_WITH_OPENCV as well.
Click Configure.
click Generate.
click Open Project to open the project in Visual Studio.
Note
Afterwards, the project is 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 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 retrieve depth maps using the following methods:
On Windows10 X64 systems, copy tycam.dll and tyimgproc.dll from the lib/win/hostapp/x64 directory of the SDK package to the compiled output folder (sample/build/bin/Release). Run sample_trigger.exe in this folder and select “Continuous” mode to obtain depth maps.
If the sample program uses OpenCV, copy the opencv_world<version>.dll file (for example, opencv_world4120.dll) from the build\x64\vc16\bin folder under the OpenCV installation directory to sample/build/bin/Release.
Run the executable file lib/win/hostapp/x64/sample_trigger.exe in the SDK package, then select “Continuous” mode to obtain depth maps.