Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

  

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.

...

If assistance is needed, contact John Medalen at 408-660-2273 (jmedalen@aptina.com).

Demo Headboard Tuning Tool Startup

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):

Image Modified

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.

...

To manually run this process, select Control Box button individually but in their presented order.

Lens Calibration - Advanced Usage

The following describes various advanced features of Lens Calibration

...

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 for an example.

 

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 #4; "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 #6).

 

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").