Windows platform (Csharp)

Downloading SDK

Choose any of the following methods to download the MultiLanguage SDK:

  • Download from Percipio.XYZ official website download center: 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 should be stored, and enter the git clone command to clone the remote repository.

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

Sample program instructions

The sample programs are stored in the csharp folder in the root directory of the development package:

  • fetch_frame.cs: This sample program is used to capture depth and color images in free acquisition mode.

  • fetch_IR.cs: This sample program is used to capture IR images in free acquisition mode.

  • fetch_isp.cs: This sample program is used to perform ISP post-processing on color images at the software level, converting RAW BAYER images with color cast into color images with standard color space.

  • fetch_registration.cs: This sample program is used to capture images of RGB-D registration.

  • fetch_trigger.cs: This sample program is used to set the camera to work in software trigger mode to capture depth maps.

  • fetch_point3d.cs: This sample program is used to capture 3D point clouds (not displayed). Log information displays the number of point clouds and the coordinates of the center point cloud (X, Y, Z).

Installing dependencies

Before compiling, please:

Compiling sample programs

To compile the sample programs, do the following:

  1. Configure environment variables: Right-click on This PC, select Properties > Advanced system settings > Environment Variables, in the Environment Variables page, add the executable file path of the local SWIG to the system variable Path.

    ../_images/setpathforswig-en.gif
  2. Open the CMakeLists.txt in the pcammls directory, modify the target language (CSHARP), the installed version of .NET Framework on your host computer, and the local path of SWIG.

    ../_images/editcmakelistCsharp.png
  3. Create a new folder in the pcammls directory and name it csharp_build_x64.

  4. Start cmake-gui, specify the source code directory as pcammls, and specify the build output directory as pcammls/csharp_build_x64.

    ../_images/specifydirectoryCsharp.png
  5. Click on Configure, select the Visual Studio version and X86/X64 version settings.

    ../_images/clickcongifure_CP.png
  6. Click on Generate.

  7. Click on Open Project to open the project, then select “Release” in the Visual Studio menu bar and click on Build > Build Solution in order.

    Note

    After modifying the source code, you need to rebuild the executable files by selecting “Release” in the Visual Studio menu bar and then click on Build > Rebuild Solution.

    ../_images/Csharpmake-en.png

After compilation, copy the dynamic library tycam.dll in the camport3/lib/win/hostapp/x64 directory to the pcammls/csharp_build_x64/Bin/Release directory, open Windows PowerShell, and run the generated executable files.

../_images/csharprun.png