VisionPro Platform
Download and Install VisionPro
Please download VisionPro from Cognex official website.
Note
Percipio has tested VisionPro 9.0 and confirmed that it can open the Percipio camera normally. It is recommended to use this tested version of VisionPro.
Set Up USB Camera Environment
If you use a USB camera, complete Set Up USB Camera Environment before proceeding.
Download camport_visionpro SDK
Choose any of the following methods to download the camport_visionpro SDK:
Access https://gitee.com/percipioxyz/camport_visionpro.git using a browser and download the SDK.
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 clonecommand to clone the remote repository.git clone https://gitee.com/percipioxyz/camport_visionpro.git
Choose any of the following methods to download the camport_visionpro SDK:
Access https://github.com/percipioxyz/camport_visionpro.git using a browser and download the SDK.
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 clonecommand to clone the remote repository.git clone https://github.com/percipioxyz/camport_visionpro.git
The directory structure of the camport_visionpro SDK is shown below:
📦 camport_visionpro SDK
├── 📁 Core Libraries
│ ├── PercipioCamera.dll # Main camera library, encapsulating core interfaces such as camera control and image acquisition
│ ├── PercipioCameraExtern.dll # Camera extension library, providing additional advanced functions or hardware extension support
│ ├── tycam.dll # Camera low-level driver or hardware communication library
│ └── tyimgproc.dll # Image processing library, providing algorithms such as image preprocessing and enhancement
│
├── 📁 Tool Modules
│ ├── PerciPioCameraToolBlock.vpp # Visual programming tool block (for graphical development environments, e.g., VisionPro)
│ └── PercipioCameraToolBlock.vtt # Tool block configuration or template file
│
├── 📁 Sample Programs
│ └── Program.cs # Project entry program
│
└── 📁 Documentation
└── Update Log.txt # Version changelog
Configure Environment
Right-click the VisionPro shortcut icon and select Open file location from the shortcut menu to access the installation directory of VisionPro.
Copy
PercipioCamera.dll,PercipioCameraExtern.dll,tycam.dllandtyimgproc.dlltobinfolder in the VisionPro installation directory.Copy
PercipioCameraToolBlock.vtttobin/Templates/Toolsfolder in the VisionPro installation directory.
Run
This section explains how to run a Percipio camera in VisionPro. Steps are as follows:
Double-click to run the VisionPro software.
Double-click Image Source to enter VisionPro(R) QuickBuild Job Editor - CogJob1 page.
click the Show VisionPro Tools icon to bring up the VisionPro Tools page.
Double-click PercipioCameraToolBlock and add it to the ToolGroup.
Double-click PercipioCameraToolBlock, select the Input/Output tab in the PercipioCameraToolBlock page, and set the input parameters.
Input Parameters Parameter Name
Description
CameraIdSet the camera serial number.
IREpipolarRectificationFlagSet the IR image epipolar rectification switch. True: enabled; False: disabled.
AlignModeSet the image alignment mode. 0: no alignment; 1: rgb2depth; 2: depth2rgb.
TimeOut_msSet the trigger timeout in milliseconds (ms). Default: 5000 ms.
orthoRefZ_mmSet the height of the orthogonal correction reference plane in millimeters (mm).
Output Parameters Parameter Name
Description
OutputColorImageOutputs the RGB color image.
OutputIRImageOutputs the IR grayscale image.
OutputDepthImageOutputs the depth image, in mm.
xPitchThe actual physical size represented by each pixel in the X direction (e.g., 4.93509 mm/pixel).
yPitchThe actual physical size represented by each pixel in the Y direction (e.g., 4.93509 mm/pixel).
click the Run icon. You can view the images captured by the camera in the output terminal.
Afterwards, add other tools according to actual needs, and connect the output port of PercipioCameraToolBlock to the input port of other tools.
Optional: If you have secondary development needs for PercipioCameraToolBlock, you can click the Create/Edit Script icon and edit the script.
Secondary Development
If you have secondary development needs for PercipioCameraToolBlock, click the Create/Edit Script icon and edit the script.
GetInt
Gets an integer feature. For example, get the color image exposure time.
int m_exposure_time = 0; ret = cameraSingle.GetInt((int)EnDeviceComponent.TY_COMPONENT_RGB_CAM, (int)En_FEATURE_ID.TY_INT_EXPOSURE_TIME, ref m_exposure_time); Console.WriteLine($"GetInt ret: {ret}");SetInt
Sets an integer feature. For example, set the color image exposure time.
cameraSingle.SetBool((int) EnDeviceComponent.TY_COMPONENT_RGB_CAM,(int) En_FEATURE_ID.TY_BOOL_AUTO_EXPOSURE, false); ret = cameraSingle.SetInt((int)EnDeviceComponent.TY_COMPONENT_RGB_CAM, (int)En_FEATURE_ID.TY_INT_EXPOSURE_TIME, 400); Console.WriteLine($"SetInt ret: {ret}");Comparison images before and after setting:
Before setting
After setting
GetBool
Gets a boolean feature. For example, get the AEC switch status.
bool aec = false; ret = cameraSingle.GetBool((int)EnDeviceComponent.TY_COMPONENT_RGB_CAM, (int)En_FEATURE_ID.TY_BOOL_AUTO_EXPOSURE, ref aec); Console.WriteLine($"GetBool ret: {ret}");SetBool
Sets a boolean feature. For example, disable AEC.
ret = cameraSingle.SetBool((int) EnDeviceComponent.TY_COMPONENT_RGB_CAM,(int) En_FEATURE_ID.TY_BOOL_AUTO_EXPOSURE, false); Console.WriteLine($"SetBool ret: {ret}");GetEnum
Gets an enumeration feature. For example, get the color camera resolution.
ret = cameraSingle.GetEnum((int)EnDeviceComponent.TY_COMPONENT_RGB_CAM, (int)En_FEATURE_ID.TY_ENUM_IMAGE_MODE, ref resolution); Console.WriteLine($"GetEnum ret: {ret}");SetEnum
Sets an enumeration feature. For example, set the color camera resolution.
uint resolution = cameraSingle.ImageMode(TY_PIXEL_FORMAT_LIST.TY_PIXEL_FORMAT_YUYV, TY_RESOLUTION_MODE_LIST.TY_RESOLUTION_MODE_1920x1440); ret = cameraSingle.SetEnum((int) EnDeviceComponent.TY_COMPONENT_RGB_CAM, (int) En_FEATURE_ID.TY_ENUM_IMAGE_MODE, resolution); Console.WriteLine($"SetEnum ret: {ret}");After running, you can see the resolution change.
Comparison images before and after setting:
Before setting
After setting
GetFloat
Gets a floating-point feature. For example, get Scale_Unit.
ret = cameraSingle.GetFloat((int)EnDeviceComponent.TY_COMPONENT_DEPTH_CAM, (int)En_FEATURE_ID.TY_FLOAT_SCALE_UNIT, ref scale_unit); Console.WriteLine($"GetFloat ret: {ret}");SetFloat
Sets a floating-point feature. For example, set Scale_Unit.
ret = cameraSingle.SetFloat((int) EnDeviceComponent.TY_COMPONENT_DEPTH_CAM, (int) En_FEATURE_ID.TY_FLOAT_SCALE_UNIT, 5.0f); Console.WriteLine($"SetFloat ret: {ret}");