Linux platform (Python)

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 python folder in the root directory of the development package:

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

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

  • frame_isp.py: 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.

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

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

  • multidevice_fetch.py: This sample program is used to set up multiple cameras for image acquisition.

  • point3d_fetch.py: 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:

  1. Install Python.

  2. Open the terminal and run the following commands to install NumPy and OpenCV:

    pip install numpy
    pip install opencv-python
    
  3. Download the SWIG source code (https://www.swig.org/download.html) to your host computer, extract it, and switch to the source code directory. Then, execute the following commands in order:

    ./configure
    make
    sudo make install
    

Compiling sample programs

To compile the sample programs, do the following:

  1. Open CMakeLists.txt in the pcammls directory, modify the target language (PYTHON), and the python version.

    ../_images/editcmakelistpythonlinux.png
  2. Open the terminal in the pcammls directory and execute the following commands:

    mkdir build
    cd build
    cmake ..
    make
    sudo make install
    
    ../_images/pythonlinuxmake.png
  3. Switch to the pcammls/camport3 directory and execute the following command:

    sudo cp lib/linux/lib_x64/libtycam.so* /usr/lib/
    

After compilation, switch to the /usr/local/PYTHON directory according to the interface prompt and run the generated python file.

../_images/linuxrunpython.png