Vision Pipeline Adjustment
Computer vision is one of the most crucial and complex components of a pick-and-place machine. It plays a key role in four primary tasks:
- Finding the homing fiducial (Top Camera)
- Identifying PCB fiducials (Top Camera)
- Calibrating Nozzle Tips (Bottom Camera)
- Calibrating component position (Bottom Camera)
The default vision settings provided in the configuration files are optimized for general use. But, due to variations in lighting conditions, component shapes, and other environmental factors, you may need to fine-tune them for optimal performance.
Tutorial Video
This video walks you through the process of calibrating vision for the LumenPnP. Each page in this section has a link to the relevant timestamp of the video.
Ambient light
Caution
Machine vision is highly sensitive to lighting conditions. We recommend maintaining consistent lighting in the workspace where the LumenPnP operates. Changes in ambient light may require readjustments to your vision settings.
Understanding Computer Vision in OpenPnP
The computer vision system in OpenPnP captures images from the top or bottom camera and processes them through a "Pipeline" consisting of multiple stages. These stages fall into three main categories:
- Image Processing: Modifies the image to make it easier for the computer to identify parts of the photo for better recognition. For example:
Threshold
, which converts an image to stark black and white. - Feature Detection: Identifies specific elements in the image. For example:
DetectCirclesHough
, which detects circular shapes. - Visualize and Debug: Vision overlays helpful markers to assist with your pipeline tuning by debugging, and tweaking it. For example:
DrawCircles
, which highlights detected circles on the image.
Each stage has adjustable "parameters" that fine-tune its function. For instance, the Threshold
stage applies a brightness cutoff to differentiate objects from the background. Adjusting its threshold
parameter changes the brightness level at which this separation occurs.
For more advanced adjustments, you can add or remove processing stages in the pipeline. We do not recommend doing this.
Pipeline Editing View
The pipeline editing view has several sections and features:
- Stage List: Displays all stages in the pipeline. Click on a stage to view its results in the main display and modify its parameters.
- Main view: Shows the output of the currently selected stage unless a specific stage is pinned (see #5).
- Stage output: Displays error messages if there's a problem with your stage or pipeline.
- Stage Settings: Allows you to change the settings for the selected stage.
- Pin Image:. Locks a specific stage’s results in the main view, even when selecting other stages. This is useful for monitoring the impact of changes to a debugging stage in real time.
Next is Homing Fiducial Pipeline