Projects‎ > ‎

Test Target Measurement Software

Update: This software is now hosted at:

A good portion of my schoolwork revolves around measuring test targets. I can't count the number of times I've used Photoshop, ImageJ, or MATLAB to measure and average image code values for different patches on a target. I also can't count the number of hours wasted.

Around the end of my Junior year, I decided enough was enough, and wrote what I hoped to be a comprehensive MATLAB function to read in rectangular test charts. In ideal circumstances charts ought to be orthogonal to the camera's principal axis, but that's not always the case. As a result, this script uses the four corners to estimate the shape and position of each patch on the target individually. Most image formats supported by MATLAB should be usable with this function.

Below is an example of the function in the process of reading a Macbeth ColorChecker SG.

The script is capable of returning average code values (shown graphically below) and standard deviation values for each patch. Each color channel is sampled separately and stored.
Additional functionality is present in the script to allow for the measurement of mosaiced images without needing to debayer the image, as well as batch-processing an entire folder of identically framed (no camera motion between exposures) images.

Another script was written to process OECF targets, which have a different patch arrangement. The image below shows it in use.

Please, if you have any questions about functionality, how to use this code, or you run into any bugs, shoot me an e-mail, available on the Contact page! Also, if you have ideas for additional functionality or improvement of the code itself (admittedly, it is not very well documented or commented) I welcome the advice!

All software, as well as test imagery, is available at: