LATERAL COLOUR ABERRATION MATLAB SCRIPT - 0v100

OVERVIEW

The LcaGui.m MatLab script measures Lateral Colour Aberration from a Black Dot Chart.

This is as the I3A CPIQ LCA method which is based on the dot chart proposed by DXO.

The key features of this Matlab script are:

  1. Flexible input file support
  2. Input crop to allow unwanted image data to be removed

This script is available in 2 variants

  1. A ZIP file of the Matlab Scripts - requires Matlab + Image Processing Toolbox
  2. A compiled Matlib EXE - requires the Matlab Component Runtime

If the Matlab Scripts are being used directly then the LcaAddLibraryPaths.m must be run first to correctly setup up the library paths (hard coded) Then the sensor start up script is run using LcaGui.m .

First ensure that Matlab current directory is C:\Local_Share\Matlab\lca_0v100\ . Then at the Matlab command prompt type

LcaAddLibraryPaths();

LcaGui();

For the compiled version of the Matlab script the LcaGui.exe in C:\Local_Share\Matlab\lca_0v100\compiled should be run.

In either case the window below should appear

GUI

INPUT OPTIONS

Configuration Files

The first step is to load a configuration file for that sensor. The configuration file is a text file and it contains the setup - image size and max code for raw files, data pedestal value, input crop, etc for that sensor.

An example configuration files are in the C:\Local_Share\Matlab\lca_0v100\config directory

  1. JPEG/BMP Colourised Data
    JPEGConfigFile.txt
  2. RAW 2064x1544 10-bit Data
    RAW2064x1544x10ConfigFile.txt

Notes:

  1. Config.XXXEnable: 0 = disabled, 1 = enabled

Image Files

The load button will load either a a Binary/Ascii pgm, a Binary .raw or a .bmp/.jpg RGB Colour File. The file type is automatically detected based on the file extension.

If it is a .raw file then the image width, image height and max code values must be specified. For PGM, BMP and JPEG files this information is automatically read from the format of the file.

For all file formats the following information must be specified

In summary

On pressing the load image button a file selection box will appear. Once the image file has been selected, the script will start to process the file. Once the processing is complete then 2 plots will appear.

  1. A plot of the Dot ROI's
  2. Lateral Colour Aberration Plot

The following files are automatically saved in the same directory as the input image file file.

For example

INPUT CROP

The input crop allows either non image data e.g. embedded data to be removed or a particular region of interest to be selected.

The check box enables or disables the application of the input crop.

The BayerSplit() function assumes the following Raw Bayer pattern

GRGRGR
BGBGBG

If the Raw Bayer has different start pixel then the input crop function can be used to implement a "jog" by selecting the appriopriate crop values

RESULTS

Reports the dot diameter statistics

EXAMPLES

The ZIP file lca_test_images.zip contains example LCA Dot Chart Images. The DXO and AMD images where used to correlate the performance of different dot centre finding implementations.

Please note that this is a large file (~28MBytes)

INSTALLATION NOTES

MATLAB INSTALLATION NOTES

There are 2 methods of distributing this Matlab script

  1. As Matlab Scripts (see ZIP file) in the next section

    In this case the requirements are the base Matlab plus the Image Processing Toolbox

  2. As Matlab compiled executable.

    In this case the Matlab Runtime Component is required. http://www.mathworks.com/support/solutions/data/1-171Z6.html

    In this case it must the the runtime library for Matlab 2007b.

MATLAB SCRIPTS INSTALLATION NOTES

  1. Create a C:\Local_Share\Matlab folder in the top-level of C drive
  2. Save lca_0v100.zip to C:\Local_Share\Matlab
  3. Unzip lca_0v100.zip to C:\Local_Share\Matlab

    It should create the following directory structure

The top level directory C:\Local_Share\Matlab\lca_0v100\ contains the LcaGui.m and LcaGui.exe files

The main function called by the LcaGui.m is called LCA.m This function is located in the directory C:\Local_Share\Matlab\lca_0v100\lib\Analysis\LCA .

REVISION HISTORY

Version Date Author Comments
0.100 25-Sep-2008 Donald BAXTER 1st Release

© 2008 STMicroelectronics, Comments to Donald Baxter