...
If you have an Excel .CSV file with extra rows or columns, you can easily edit it Excel by selecting the key region (3 columns, 24 rows), copying it to a new file, and saving it in .CSV format. L*a*b* data is preferred to xyY data below because it is independent of white point color temperature, hence less error-prone.
Reference files read by Imatest are in row-major order. This means that the order for an mxn (m rows x n columns) chart is R1C1, R1C2, …, R1Cn R2C1, R2C2, …, R2Cn, …, RmC1, RmC1, …, RmCn. But some reference files available on the internet are in column-major order (R1C1, R2C1, …, RmCqn R1C2 R2C2, …, RnC2, …, R1Cn R2Cn, …, RmCn). They have to be transformed into row-major order to be read correctly into Imatest. We show a method for doing this below.
Color reference files can also be derived from measured values from a camera you determine to be a “gold standard” by running Color/Tone Interactive, then pressing File, Save L*a*b* results as CSV reference (making sure to check CSV reference file of L*a*b* results…). This can be useful for manufacturing testing because the camera under test is compared with the attainable values of a golden sample rather than unattainable ideal values.
...
Load your image(s) into Imatest
Start your analysis
Proceed through settings & ROI selection
In the interactive results window, select Density CSV file (one value per line) in the Ref dropdown, as shown in the image below. This will open a browser for you to select your reference file.
...
Converting a reference file from column to row-major
To convert from column-major order (frequently found in reference files downloaded from the internet) to row-major, the first step is to open the downloaded file in Excel. Reference files often include extra data. Here is an example from the Image Engineering TE262 Universal Test Target file, used for evaluating scanners. The color pattern in the large UTT chart is shown below. (There are two of these in some printed charts.)
...
Here is a portion of the reference file, opened in Excel. We want to extract cells B7 through D33 (27 rows, 3 columns in column-major order). In this case, we are using the generic (typical; not individually measured) data, shown with the blue background.
...
To obtain the data-only, select the required columns (B7:D33), and copy them. Then paste into a new blank worksheet. The first 10 lines (of 27) will look like
18 | 24 | -61 |
82 | 3 | 90 |
61 | 38 | 74 |
21 | 35 | -32 |
32 | 24 | 32 |
45 | -32 | 38 |
85 | -2 | -9 |
86 | 13 | 7 |
90 | -17 | 6 |
53 | -45 | 38 |
Now comes the tricky part. Add data to the fourth column indicating how you’d like to sort the data to convert to column to row-major. Line 1 doesn’t change, so add 1. Line 2 will go into Row 2, Column 1, which is line 4 in row-major. Line 3 will go into Row 3, column 1, which is line 7 in row-major. Continue in increments of 3 for the 9 rows. THen line 10 will go into Row1, Column 2, etc. The first 14 rows (of 27) will be
18 | 24 | -61 | 1 |
82 | 3 | 90 | 4 |
61 | 38 | 74 | 7 |
21 | 35 | -32 | 10 |
32 | 24 | 32 | 13 |
45 | -32 | 38 | 16 |
85 | -2 | -9 | 19 |
86 | 13 | 7 | 22 |
90 | -17 | 6 | 25 |
53 | -45 | 38 | 2 |
49 | 56 | -14 | 5 |
35 | 12 | -53 | 8 |
72 | -25 | 65 | 11 |
64 | 20 | 19 | 14 |
Because of the simple repetition in column 4 (mostly increments of 3 columns), it’s a lot easier than copying and pasting lines. Now Select the 27 lines and 4 columns, right-click, and press Sort > Custom sort. This opens the Sort window. Choose Sort by Column D, then press OK. This sorts the data so that column D is in sequence, 1, 2, …, 27.
...
Now select columns 1-3 (A1:C27), copy them, paste into a blank worksheet, and save as a csv or txt file. You have a column-major reference field. . Here is an example from Color/Tone Interactive.
...
See Also
Colorcheck Reference File (legacy module: Color/Tone is recommended for new work)
Measuring Test Chart Patches with a Spectrophotometer for details about how to create a reference file using measurements from an instrument.