This repository contains Python samples for Mech-Eye SDK.
- Clone this repository to a specific folder.
- Install Mech-Eye API for Ubuntu.
- Install Mech-Eye API python wrapper by pip3.
pip3 install MechEyeAPI- Open and run one of the samples.
python3 ConnectAndCaptureImage.py- Clone this repository to a specific folder.
- Install Mech-Eye SDK for Windows.
- Install Mech-Eye API python wrapper by pip.
pip install MechEyeAPI- Open and run one of the samples.
python ConnectAndCaptureImage.pySamples 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.
- ConnectToCamera
- Advanced
- CaptureCloudFromDepth
(Open3D)
Construct point clouds from depth map and 2D image captured from a camera. - CaptureSequentiallyMultiCamera Obtain 2D image, depth map and 3D images sequentially from multiple cameras.
- CaptureSimultaneouslyMultiCamera Obtain 2D image, depth map and 3D images simultaneously from multiple cameras.
- CaptureTimedAndPeriodically Obtain 2D image, depth map and 3D images periodically for the specified duration from a camera.
- CaptureCloudFromDepth
- 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.
- GetCameraIntri
- 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.
- SetLaserFramePartitionCount
- 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.
- SetUHPCaptureMode