Skip to content

shuaidang/mecheye_python_samples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Python Samples

This repository contains Python samples for Mech-Eye SDK.

Installation

Ubuntu

  1. Clone this repository to a specific folder.
  2. Install Mech-Eye API for Ubuntu.
  3. Install Mech-Eye API python wrapper by pip3.
pip3 install MechEyeAPI
  1. Open and run one of the samples.
python3 ConnectAndCaptureImage.py

Windows

  1. Clone this repository to a specific folder.
  2. Install Mech-Eye SDK for Windows.
  3. Install Mech-Eye API python wrapper by pip.
pip install MechEyeAPI
  1. Open and run one of the samples.
python ConnectAndCaptureImage.py

Sample List

Samples are divided into five categories, Basic, Advanced, Util, Laser and UHP.

  • Basic: camera connection and basic capturing functions.
  • Advanced: advanced capturing functions.
  • Util: obtain information from a camera and set camera parameters.
  • Laser: for Laser/LSR series cameras only.
  • UHP: for UHP series cameras only.

The samples marked with (Open3D) require open3d to be installed via pip. The samples marked with (OpenCV) require opencv-python and opencv-contrib-python to be installed via pip.

  • Basic
    • ConnectToCamera
      Connect to a Mech-Eye Industrial 3D Camera.
    • ConnectAndCaptureImage
      Connect to a camera and obtain 2D image, depth map and 3D image.
    • CaptureColorMap (OpenCV)
      Obtain 2D image in OpenCV format from a camera.
    • CaptureDepthMap (OpenCV)
      Obtain depth map in OpenCV format from a camera.
    • CapturePointCloud (Open3D)
      Obtain untextured and textured point clouds (PCL format) generated from images captured with a single exposure time.
    • CaptureHDRPointCloud (Open3D)
      Obtain untextured and textured point clouds (PCL format) generated from images captured with multiple exposure times.
    • CapturePointCloudROI (Open3D)
      Obtain untextured and textured point clouds (PCL format) of the objects in the ROI from a camera.
  • Advanced
  • Util
    • GetCameraIntri
      Get and print a camera's intrinsic parameters.
    • PrintDeviceInfo
      Get and print a camera's information such as model, serial number and firmware version.
    • SetDepthRange
      Set the range of depth values to be retained by a camera.
    • SetParameters
      Set specified parameters to a camera.
    • SetUserSets
      Functions related to parameter groups, such as getting the names of available parameter groups, switching parameter group, and save the current parameter values to a specific parameter group. The parameter group feature allows user to save and quickly apply a set of parameter values.
  • Laser
    • SetLaserFramePartitionCount
      Divide the projector FOV into partitions and project structured light in one partition at a time. The output of the entire FOV is composed from images of all partitions.
    • SetLaserFrameRange
      Set the projection range of the structured light. The entire projector FOV is from 0 to 100.
    • SetLaserFringeCodingMode
      Set the coding mode of the structured light pattern for a camera.
    • SetLaserPowerLevel
      Set the output power of the laser projector in percentage of max power. This affects the intensity of the laser light.
  • UHP
    • SetUHPCaptureMode
      Set the capture mode (capture images with camera 1, with camera 2, or with both 2D cameras and compose the outputs.py).
    • SetUHPFringeCodingMode
      Set the coding mode of the structured light pattern.

About

Python samples for Mech-Eye camera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%