...
Excerpt | ||
---|---|---|
| ||
used to generate Lens Shading Correction (LSC) coefficients |
Table of Contents | ||
---|---|---|
|
Introduction
The Demo Headboard Tuning tool is used to program a sensor headboard's EEPROM with Lens Shading Correct (LSC) coefficients to ensure image quality. The resulting settings are also stored in an INI file.
...
Once a good image is shown in DevWare, the Demo Headboard Tuning tool can be started. To launch it, select "Demo Headboard Tuning" from the "Plug-ins" menu item (see Image #1):
...
Usage
Lens Calibration is used to describe the process of generating lens shading correction (LSC) coefficients (see Image #2). The resulting settings can then be loaded in the EEPROM and/or stored in a file.
The Lens Calibration process is fully automated via the tooktool, but each step can be run individually if desired, but in most cases this is not necessary.
...
The following describes various advanced features of Lens Calibration
To use any of the advanced features, first re-initialize the sensor by selecting the Init menu item. This will reset the sensor and apply the default settings. It will also load the LSC that was just programmed into the EEPROM.
...
The Color Uniformity indicator objectively evaluates the lens shading correction using a mathematical formula calibrated to human image quality perception. The lower the value, the better the image quality is. A value of 2.0 or less represents no loss of image quality. If the value is 2.0 or less then the indicator will be green. If the value is more than 2.0 but less than 3.0 the indicator will be yellow, and a value of 3.0 or more the indicator will be red. In those cases something may have gone wrong with the calibration and the source of the problem should be investigated. The problem area(s) will be highlighted with a red square. See Image #5 #4 for an example.
Possible causes and resolutions of Color Uniformity failures are:
- Dust on the sensor; this will be indicated by one or several randomly situated red square. It may be possible to clean the sensor and run Lens Calibration again.
- The lens may be misaligned; this will be indicated by red squares situated on a single edge of the display. In some cases the lens can be adjusted.
- Good Color Uniformity is less than value may be too low for the given sensor; this will be indicated by red squares covering most of the image. Note that a value of 2.00 is based on evaluation and measurement of human perception to image quality, so increasing this value may resolve the Color Uniformity error but will result in overall lower image quality.
Note: The LSC setting will be saved to the EEPROM and the file regardless of the Color Uniformity result
Evaluate the LSC solution
A subjective method to evaluate the effectiveness of the LSC solution is to view the image. With LC enabled, the color should be uniform across the entire image. Disable LC by selecting the Disable LC button; the color should now appear non-uniform. Enable LC by selecting the same button again, now labeled Enable LC.
Another subjective method to evaluate the effectiveness of the LSC solution is to use the Analysis Graph.
- Display the Analysis Graph by selecting the Show Graph button.
- Set the Analysis Graph type by selecting Row from the "Mouse Selection" box, and then within the image display set the Analysis Graph location so it is in the center of the image.
- Select Cumulative Intensity in the Analysis Graph and observe that the displayed lines of red, green, and blue are flat and uniform (see Image
...
- #3; "Analysis Graph").
- To observe what happens when LC is not enabled, select the Disable LC button. The Analysis Graph will now display lines that are uneven and non-uniform (see Image
...
- #5).
Name of file containing the LSC settings
If saving of the Lens Calibration to a file was enabled, the name of the file can be found next to the Save to File button in Control Box 4. The file name is generated by using the sensor's part number and revision.
Lens Calibration – INI file Notes
Note: This section is targeted for Aptina Application Engineers only.
Required Preset
The Demo Headboard Tuning Tool expects the sensor's INI file to have a preset named "Lens Calibration Setup". This preset is used by the tool to configure the sensor before it continues with the lens calibration process.
The tool needs uncorrected Bayer data for the calibration, and corrected data for the color uniformity test. Most SOCs have a Bypass-with-LC mode that can be used for both. The "Lens Calibration Setup" preset puts the SOC is Bypass-with-LC mode with LC off. The tool does the calibration and then turns on the PGA enable bit for the color uniformity test, which it knows how to do.
Some SOCs (0367 and 1040, for example) don't have Bypass-with-LC mode. In that case Lens Calibration Setup puts it in regular Bypass mode, and there is another preset called "Lens Calibration Verify" that puts it in a mode suitable for the color uniformity test, usually normal SOC non-bypass mode.
"Lens Calibration Setup" on an SOC has to ensure all auto functions are off so that the integration time and analog gain registers can be written from the host. Often that means pausing or stopping the firmware altogether.
For a VGA part Lens Calibration Setup should put it in full resolution Bypass mode.
Option Settings
Some of the Demo Headboard Tuning Tool's settings can be configured within the "Lens Calibration Setup" preset.
OPTION= LensAssist Dir, "directory path" // note the quotes are required
OPTION= LensAssist Falloff for <sensor_name>, <value>// Falloff value
OPTION= LensAssist GoodCU for <sensor_name>, <value> // Color Uniformity threshold * 1000
OPTION= LensAssist Left Temp for < sensor_name>, <value> // APGA parts only
OPTION= LensAssist Mid Temp for < sensor_name>, <value> // APGA parts only
OPTION= LensAssist Right Temp for < sensor_name>, <value> // APGA parts only
The <sensor_name> must match the "Name" field from the sdat file (shown at the top of the left-hand Info panel in DevWare, as "Sensor").