Component Selector (Stereo ace)#
Basler Stereo ace cameras generate a frame-based data stream. Each frame consists of one or multiple components. For each individual component, you can select a pixel format to control how the component's data is represented.
Components#
The following components are available:
- Intensity: Left rectified camera image
- IntensityCombined: Left rectified camera image stacked on right rectified camera image
- Disparity: Disparity image in desired resolution, i.e.,
BslDepthQualityset toFull,High,Medium, orLow - Confidence: Confidence image
- Error: Disparity error image
To simplify image processing, the Stereo ace camera rectifies all camera images based on the camera's calibration. This means that lens distortion is removed and the principal point is located exactly in the center of the image. After rectification, an object point is guaranteed to be projected onto the same pixel row in both left and right image. That point's pixel column in the right image is always lower than or equal to the same point's pixel column in the left image. The term disparity describes the difference between the pixel columns in the right and left images and expresses the depth or distance of the object point from the camera. The disparity image stores the disparity values of all pixels in the left camera image.
The larger the disparity, the closer the object point. Often, there are pixels for which the disparity can't be determined. This is the case for occlusions that appear on the left sides of objects because these areas can't be seen by the right camera. Pixels for which the disparity can't be determined are marked as invalid with the special disparity value of 0.
To compute disparity values, the stereo matching algorithm has to find corresponding object points in the left and right camera images. These are points that represent the same object point in the scene. For stereo matching, the Stereo ace camera uses SGM (Semi-Global Matching).
For each disparity image, an error image and a confidence image are provided as well. These images indicate uncertainty regarding the accuracy of each disparity value. They have the same resolution and the same frame rate as the disparity image. The error image contains the disparity error deps in pixels corresponding to the disparity value at the same image coordinates in the disparity image. The confidence image contains the corresponding confidence value c, specified by a value between 0 and 1. The confidence is defined as the probability of the true disparity value being within a range of three times the error around the disparity d measured, i.e., [d-3deps, d+3deps]. Thus, the disparity image with error and confidence values can be used in applications requiring probabilistic inference. The confidence and error values corresponding to an invalid disparity measurement will be 0.
Each image comes with a Component ID Value specified in the following table. This unique identifier value should be used to distinguish between the different component types.
| Component Name | Component ID |
|---|---|
| Intensity | 1 |
| IntensityCombined | 65281 |
| Disparity | 8 |
| Confidence | 6 |
| Error | 65282 |
Selecting a Component#
You can choose which component you want the camera to transmit by enabling the respective component using the ComponentSelector parameter.
To enable a component:
-
Set the
ComponentSelectorparameter to the desired component:Intensity: The Intensity component will be selected.IntensityCombined: The IntensityCombined component will be selected.Disparity: The Disparity component will be selected.Confidence: The Confidence component will be selected.Error: The Error component will be selected.
-
Set the
ComponentEnableparameter totrue. - Set the
PixelFormatparameter to the desired pixel format for the component. - Repeat for other components if required.
Info
If you're using the Stereo Camera Viewer, you can't deselect any components because the Viewer requires all of them to be enabled. If you're accessing the camera directly via the pylon SDK, you are free to select and deselect components as required. The camera mus be idle when you're changing components.