Balluff - BVS CA-MLC / BVS CA-IGC Technical Documentation
|
Due to random process deviations, technical limitations of the sensors, etc. there are different reasons that image sensors have image errors. Balluff provides several procedures to correct these errors, by default these are host-based calculations, however some device families support device-based corrections, which saves dozens of % CPU load and lowers latency.
Device Family BVS CA- | Adaptive defective pixel correction (Device) | List-based defective pixel correction (Device) | List-based defective pixel correction (Host) | Flat-Field Correction (Host) | Flat-Field Correction (Device) |
GX0 | - | - | X | X | X |
GX2 | X* | X | X | X | - |
GT1 | X** | - | X | X | - |
SF1 | - | - | X | X | - |
SF2..SF5 | X* | X | X | X | - |
IGC/MLC | - | - | X | X | - |
* Applies when binning/decimation is used; mvDevicePixelEnable enabled.
** Always active
There are exceptions. In doubt check the Appendix A. Specific Camera / Sensor Data .
Generally, removing defect pixels requires two sub-tasks:
Both tasks can performed in different "locations":
mvDefectivePixelCorrectionControl
in the list-based modemvDefectivePixelCorrectionControl
in the algorithm-based mode.If detection is not happening in real-time, meaning during the image acquisition itself, it is necessary to store the detected defects somewhere. This can be either on the device or the host or both.
As mentioned, the defect pixel list can be generated using Impact Acquire. Since there are three types of defects, Impact Acquire offers three calibration methods for detection:
To detect leaky pixels the following steps are necessary:
"Setting → Base → Camera → GenICam → Analog Control → Gain = 0 dB"
) and exposure time "Setting → Base → Camera → GenICam → Acquisition Control → ExposureTime = 360 msec"
to the given operating conditions "Mode = Calibrate leaky pixel"
"Acquisition Mode = SingleFrame"
) The filter checks:
Pixel > LeakyPixelDeviation_ADCLimit // (default value: 50)
All pixels above this value are considered as leaky pixel.
To detect hot or cold pixels the following steps are necessary:
"Mode = Calibrate Hot Pixel"
or "Mode = Calibrate Cold Pixel"
or "Mode = Calibrate Hot And Cold Pixel"
"Acquisition Mode = SingleFrame"
) The filter checks:
Pixel > T[hot] // (default value: 15 %) // T[hot] = deviation of the average gray value
Pixel < T[cold] // (default value: 15 %) // T[cold] = deviation of the average gray value
"DefectivePixelsFound"
. If you want to reset the correction data or repeat the correction process you have to set the filter mode to "Reset Calibration Data"
. In order to limit the amount of defective pixels detected the "DefectivePixelsMaxDetectionCount"
property can be used.To save and load the defective pixel data, appropriate functions are available:
The section "Setting → Base → ImageProcessing → DefectivePixelsFilter" was also extended (see Figure 2). First, the "DefectivePixelsFound"
indicates the number of found defective pixels. The coordinates are available through the properties "DefectivePixelOffsetX"
and "DefectivePixelOffsetY"
now. In addition to that it is possible to edit, add and delete these values manually (via right-click on the "DefectivePixelOffset"
and select "Append Value" or "Delete Last Value"). Second, with the functions
you can exchange the data from the filter with the device and vice versa.
Just right-click on "mvDefectivePixelWriteToDevice"
and click on "Execute" to write the data to the device (and hand over the data to the Storing pixel data on the device). To permanently store the data inside the device s non-volatile memory afterwards "mvDefectivePixelDataSave"
must be called as well!
While opening the device, the device will load the defective pixel data from the device. If there are pixels in the filter available (via calibration), nevertheless you can load the values from the device. In this case the values will be merged with the existing ones. I.e., new ones are added and duplicates are removed.
After a defect-list is generated, a host-based correction can be performed using Impact Acquire.
To correct the defective pixels various substitution methods exist:
dpfmReplaceDefectivePixelAfter3x3Filter
in the corresponding API manual for additional details about this algorithm and when and why it is needed As described before, it is possible to upload lists of defect pixel onto the device. Different algorithms can be used to determine whether a pixel is defective or not, which is dependent of how much it is allowed a pixel to deviate, temperature, gain, and exposure time. As described before, the list-based correction is deterministic, meaning it is exactly known which pixels will be corrected.
Anyhow, the list-based correction has some disadvantages:
In this case, the device performs detection and correction on-the-fly without using any defect-list.
The adaptive correction addresses the above-mentioned disadvantages of the list-based method. While the correction itself (this is which pixels are used to correct an identified defect) is the same, no static information from a list is used, instead they are detected "on the fly".
To use reasonable thresholds, knowledge of the noise statistics of the sensor is used to detect the outliers. These will be corrected also on the fly. Because this is a dynamic approach, it also works in binning/decimation modes and would also detect new appearing defects.
Nevertheless, there are some disadvantages:
On BVS CA-SF devices, the adaptive correction is always used if:
Each pixel of a sensor chip is a single detector with its own properties. Particularly, this pertains to the sensitivity as the case may be the spectral sensitivity. To solve this problem (including lens and illumination variations), a plain and equally "colored" calibration plate (e.g. white or gray) as a flat-field is snapped, which will be used to correct the original image. Between flat-field correction and the future application you must not change the optic. To reduce errors while doing the flat-field correction, a saturation between 50 % and 75 % of the flat-field in the histogram is convenient.
To make a flat field correction following steps are necessary:
BayerXY
in "Setting → Base → Camera → GenICam → Image Format Control → PixelFormat". "Mode = Calibrate"
(Figure 4) "Acquisition Mode = Continuous"
) "Mode = On"
"Action → Capture Settings → Save Active Device Settings"
The filter snaps a number of images (according to the value of the CalibrationImageCount
, e.g. 5
) and averages the flat-field images to one correction image.
In some cases it might be necessary to use just a specific area within the device's field of view to calculate the correction values. In this case just a specific AOI will be used to calculate the correction factor.
You can set the "host-based flat field correction" in the following way:
In some cases it might be necessary to correct just a specific area in the device's filed of view. In this case the correction values are only applied to a specific area. For the rest of the image, the correction factor will be just 1.0.
You can set the "host-based flat field correction" in the following way: