Introduction
Before Imatest’s Arbitrary Charts module can analyze an image of a test chart (possibly of your own design), it needs to know exactly what the chart design is.
This requires information about the chart’s features (the elements present on the chart that aren’t just its background color, e.g. color patches, slanted squares, registration marks, etc). The information required includes both layout parameters so that the features can be located correctly and ROIs generated from them, and reference-value information about the features in some cases, such as the true LAB or sRGB value of a color patch.
Chart definitions come in the form of JSON-formatted text files which describe the properties of the chart and its features. These files can be created by hand or by a user-defined automated process if you are so inclined to create one.
In our experience so far, the process has been as follows:
- Design a chart comprised of the allowed features in a graphics editing program such as Inkscape or Adobe Illustrator
- Measure or record the positions and sizes of all of the features, and convert to normalized units (see below), as well as the other reference values (color values, etc)
- Create a JSON file by hand with the required fields describing the chart, as described below
JSON Setup
To analyze a chart, Imatest needs to have a definition of that chart. The following describes the necessary information that Imatest needs to analyze observed images of that chart.
Arbitrary Charts are defined as follows:
- A rectangular field with normalized (x,y) coordinates from 0-1
- The origin in the upper left (“image style”)
- A defined background color
- An identifying name (e.g., “SFR Plus 5×7”)
- A set of features to be analyzed from the set below
JSON definition files require a field that defines each chart property such as background color, encoding, and aspect ratio. It also defines an array of features drawn on the chart. Each chart feature is listed as a JSON object, with its own set of required fields to define its properties. Below is an illustration of the correct JSON structure:
JSON Structure
General Chart Properties
- The entire width and height of an Arbitrary Chart is interpreted as the background area for uniformity analysis. This excludes areas designated as features or keep-out areas.
- All fields are required unless marked explicitly as “(Optional)”. Additional fields may be included in feature definitions, but will be ignored.
- For JSON number types, decimals with values less than one must have a leading zero e.g., 0.25, not .25.
Field Name |
JSON Value Type | Description |
bgValue | array of numbers | Needs valid number of elements for given encoding e.g., [127,127,127] |
bgEncoding | string | Valid color space encoding type string e.g., “CMYK”, “sRGB” |
name | string | Name of the chart e.g., “SFRplus_5x7” Note: Chart names must consist only of alphanumeric characters or underscores, (no spaces) as they will serve as a basis for results file names. |
aspectRatio | number | The overall width divided by the overall height, e.g., 1.750. *Note, this number is unit-less. |
Features
After the background area has been defined, features can be placed on the chart. The Test Charts Module can be used to generate chart features. The following is a set of allowed features that can be analyzed by Arbitrary Charts.
Shared Feature Properties
- Each feature type has its own set of indices, which must start with a value of 1.
- The rotation of each feature is assumed applied to the feature after it is placed and sized.
- The following properties are shared among all Arbitrary feature types, including “KeepoutArea”:
Field Name |
JSON Value Type | Description |
featureType | string | Indicates the type of feature e.g., “SlantedSquareFeature” |
center | array of 2 numbers | Position of the center of the feature [x,y] in normalized coordinates |
ind | number | Integer identifying index of feature. *Note, the index starts at 1 for each family of features |
height | number | Height ranging from 0-1 of normalized y-dimension |
width | number | Width ranging from 0-1 of normalized x-dimension |
rotation | number | (Optional) Rotation in degrees – clockwise |
Field Name | JSON Value Type | Description |
featureType | string | “SlantedSquareFeature” |
encoding | string | Valid color space encoding type string e.g., “CMYK”, “sRGB” |
value | array of numbers | Needs valid number of elements for given encoding e.g., [127,127,127] |
Field Name | JSON Value Type | Description |
featureType | string | “SlantedEdgeFeature” |
encoding | string | Valid color space encoding type string e.g., “CMYK”, “sRGB” |
darkValue | array of numbers | Needs valid number of elements for given encoding e.g., [127,127,127] |
lightValue | array of numbers | Needs valid number of elements for given encoding e.g., [200,200,200] |
slantAngle | number | Slant in degrees – clockwise from horizontal |
Note: The Arbitrary Charts module currently requires at least four registration marks on every chart. The index should start with 1 from the top left and increase clockwise around the chart. Registration marks on the corners of cross-correlation texture patterns count as part of part of the RandomFieldFeature, not registration marks. They should not have separate entries or count towards the indices of RegMarkFeatures. The Test Charts Module can be used to generate registration marks.
Field Name | JSON Value Type | Description |
featureType | string | “RegMarkFeature” |
Note: When the optional “useForNoisePSD” is marked true, the noise Power Spectral Density (PSD) is calculated for texture-direct analysis. Typically, a neutral gray color patch of 18% reflectivity would be used for this purpose. Otherwise, this can be left as false by default.
Field Name | JSON Value Type | Description |
featureType | string | “ColorPatchFeature” |
encoding | string | Valid color space encoding type string e.g., “CMYK”, “sRGB” |
value | array of numbers | Needs valid number of elements for given encoding e.g., [127,127,127] |
useForNoisePSD | boolean | (Optional) Flag to indicate use for noise PSD subtraction for direct e.g., true, false |
Note: Registration marks on the corners of cross-correlation texture patterns count as part of part of the RandomFieldFeature, not registration marks. They should not have separate entries or count towards the indices of RegMarkFeatures. The Test Charts Module can be used to generate random patterns.
Field Name | JSON Value Type | Description |
featureType | string | “RandomFieldFeature” |
randomType | string | Random field design e.g., “Direct_gray”, “Direct_color”, “Cross_gray”, “Cross_color”, “DXO_direct_gray”, “IE_cross_color” |
Note: Rotation indicates degrees clockwise from horizontal with wide edge on left, as illustrated above (typically rotated in multiples of 90°). For definition purposes, line-widths per picture height refers to line widths per chart height.
Field Name | JSON Value Type | Description |
featureType | string | “WedgeFeature” |
lwphHigh | number | Integer of line widths per picture height at the wedge wide end. |
lwphLow | number | Integer of line widths per picture height at the wedge narrow end. |
nSpokes | number | Integer number of b/w pair ‘spokes’. Each black line adds one. |
Note: The StarFeature includes the OECF patches surrounding the sinusoidal star pattern. The Test Charts Module can be used to generate star features.
Field Name | JSON Value Type | Description |
featureType | string | “StarFeature” |
nSpokes | number | Integer number of b/w pair ‘spokes’. Each black line adds one. |
“KeepoutArea”
Note: Keep-out areas must be used to designate regions of the chart that don’t strictly consist of the background color or defined feature. This includes graphics, text, gaps, etc. that should not be included in uniformity analysis. The center, width, and height of keep-out areas are defined like any other Arbitrary Charts feature.
Field Name | JSON Value Type | Description |
featureType | string | “KeepoutArea” |
Design & Printing
In most cases, chart-definitions are tied to both layout and media. After an Arbitrary Chart has been designed as a vector graphic (typically in Inkscape or Adobe Illustrator), the specific substrate and print medium needs to be considered (e.g, reflective and transmissive media will need two different .jsons, because the values of the color patches will be different). The Test Charts Module can be used to generate chart features.
You’ll need to consider your imaging distance and minimum print resolution. Imatest offers professional printing services in a wide variety of substrates and sizes!
If you need additional help creating a custom chart design, please contact support@imatest.com. We offer consulting services for larger costumer projects.