Versions Compared

Key

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

finds register settings for the lens correction block on Aptina image sensors given an input image of a flat field.

...

Descriptions - lenscalib.exe

LensCalib.exe finds register settings for the lens correction block on Aptina image sensors given an input image of a flat field. It can also simulate the corrected image if given register settings and an uncorrected image.

...

Integer parameters can be given in decimal or hex with 0x prefix.

-input <filename>
The file name of the input image.
For SOC devices this file can be a YCbCr image taken with linear gamma and no color correction, but it is highly recommended to use the Bayer Bypass mode for lens calibration if possible. If the input is not YCbCr then for the sensor A-2010-SOCJ (MT9D111) this must be a 24-bit RGB BMP file taken with linear gamma and no color correction. For all other sensors it must be a Bayer image. Image dimensions should be the full size of the sensor. For an SOC with a lens-corrected Bayer bypass mode, should be the output image size when the sensor is in that bypass mode. If the input image is YCbCr then it is required to also specify the byte order with one of -CbYCrY, -YCbYCr, -CrYCbY or -YCrYCb.

...


Default = 10 - if bpp = 8

42 - if bpp = 10

     168 - if bpp = 12

         0 - if YCbCr

 

-white <integer>
For YCbCr input files, this sets what value of Y corresponds to white. Default = 255.

...

-wideangle <integer>
If you are using a wide angle lens that does not illuminate the active area of the sensor all the way to the corners then try using a value of 1. Otherwise use 0. Default is 0. Applies to polynomial algorithm only.

 

-autopga <left/middle/right> <color-temp> <filename>
Create AS0260 style Auto-PGA settings. Three -autopga parameters are needed for left, middle and right sets. For each indicate if the file is for the left, middle or right setting, the color temperature in Kelvins, and the input image file name.

 

-outini <filename>
File name for register settings. If not specified, register settings are written to stdout.

...

  • ini - DevWare .ini file format with REG= commands.
  • fieldwr - DevWare .ini file format with FIELD_WR= commands.
  • c - C/C++ array, "{ <reg>, <data> }," or "{ <page>, <reg>, <data> },". Use -header and -footer to create the array declaration and close }.
  • otpm - DevWare ini file format with REG= command, and the data placed in the OTPM register area.
  • otpmc - C array format with the data placed in the OTPM register area.

 

-header "string"
String to put at top of register output file.

...

The bits per pixel of the output file will be the same as the input image, except BMP is 8 bits, DNG is 12 bits and PNG is 16 bits. 

-sbl <filename>
Filename to receive SBL (shading balance) values.

 -ratios
Add corrected image color ratios to the output ini file.

-generic <filename>
 Filename to receive Generic LSC values (9x7).
 (experimental)

-qualcomm <filename>
 Filename to receive Generic LSC values (17x13).
 (experimental)

-whitepoint <filename>
 Filename to receive generic white point values.
 (experimental)

-pdaf-d
Run pdaf_sc_calib, and use -d parameter (dash pattern).

-pdaf-l
Run pdaf_sc_calib, and use -l parameter (line pattern).

-horizontalborder <n>
If running pdaf_sc_calib, pass this number for horizontal border. Default: if possible do not include, else 0

-firstlineoffset <n>
If running pdaf_sc_calib, pass this number for first line offset. Default: if possible do not include, else 0

-linespacing <n> If running pdaf_sc_calib, pass this number for line spacing. Default: do not include