## spectro/ccmxmake

### Summary

For a particular Colorimeter and Display combination, use a reference Spectrometer instrument to create a correction matrix (ccmx). This can then be used to improve the accuracy of subsequent Colorimeter measurements on that Display by using it with the dispcal, dispread and spotread -X option. See Wide Gamut Displays and Colorimeters for more information on why this may be useful.
There is a list of contributed ccmx (Colorimeter Correction Matrix) files.

### Usage Summary

ccmxmake [-options] correction.ccmx
-v Verbose mode
-f file1.ti3,file2.ti3 Create from two .ti3 files rather than measure.
-display displayname [X11 only] Choose X11 display name
-d n[,m] [X11 only] Choose the display from the following list (default 1),
and optionally choose a different display m for VideoLUT access.
-d n Choose the display from the following list (default 1)
-p Use projector mode (if available)
-y c|l Display type, c = CRT, l = LCD
-P ho,vo,ss Position test window and scale it
ho,vi: 0.0 = left/top, 0.5 = center, 1.0 = right/bottom etc.
ss: 0.5 = half, 1.0 = normal, 2.0 = double etc.
-F Fill whole screen with black background
-n [X11 only] Don't set override redirect on test window
-N Disable auto calibration of instrument
-H Use high resolution spectrum mode (if available)
-V Use adaptive measurement mode (if available)
-C "command" Invoke shell "command" each time a color is set
-o observ Choose CIE Observer for spectral data:
1931_2 (def.), 1964_10, S&B 1955_2, shaw, J&V 1978_2
-s steps Override default test pattern size (default 3)
-W n|h|x Override serial port flow control: n = none, h = HW, x = Xon/Xoff
-D [level] Print debug diagnostics to stderr
-I "displayname" Set display make and model description
-E "description" Set the profile Description string (Default "inoutfile")
correction.ccmx File to save correction to.

### Usage Details and Discussion

The -v flag causes extra information to be printed out during chartread operation.
-f file1.ti3,file2.ti3 By default ccmxmake creates a .ccmx file by displaying test patches on the screen, and then prompting you to measure them interactively with the two instruments. An alternative is to create a small number of test values using targen suitable for display profiling, and then measure them with the two instruments using dispread to create two spectral reading files (ie. use the -s flag with dispread), and then provide the two files as arguments to ccmxmake -f. The filenames should be concatenated with a "," separator without spaces. You will also have to supply a display name using the -I option.
When running on a UNIX based system that used the X11 Windowing System, ccmxmake will by default use the $DISPLAY environment variable to determine which display and screen to read from. This can be overridden by supplying an X11 display name to the -display option. Note that if Xinerama is active, you can't select the screen using $DISPLAY or -display, you have to select it using the -d parameter.
By default the main display will be the location of the test window. If the system has more than one display or screen, an alternate display/screen can be selected with the -d parameter. If you invoke ccmxmake so as to display the usage information (i.e. "dispcal -?" or "dispcal --"), then the discovered displays/screens will be listed. Multiple displays may not be listed, if they appear as a single display to the operating system (ie. the multi-display support is hidden in the video card driver). On UNIX based system that used the X11 Windowing System, the -d parameter will override the screen specified by the $DISPLAY or parameter.
Because of the difficulty cause by TwinView and MergedFB in X11 based systems, you can optionally specify a separate display number after the display that is going to be used to present test patches, for accessing the VideoLUT hardware. This must be specified as a single string, e.g. -d 1,2 . Some experimentation may be needed using dispwin on such systems, to discover what screen has access to the VideoLUT hardware, and which screens the test patches appear on.
The -p flag allows measuring in projector mode, using instruments that support this.
Display type. Colorimeters can do a more accurate job if they know what type of display technology they are measuring. Use -yc if you are calibrating a CRT (Cathode Ray Tube) type monitor or Plasma type display, and use -yl if you are calibrating an LCD (Liquid Crystal Display). A spectrometer instrument will not need this option.
The -P parameter allows you to position and size the test patch window. By default it is places in the center of the screen, and sized appropriately for the type of instrument. The ho and vo values govern the horizontal and vertical offset respectively. A value of 0.0 positions the window to the far left or top of the screen, a value of 0.5 positions it in the center of the screen (the default), and 1.0 positions it to the far right or bottom of the screen. The ss parameter is a scale factor for the test window size. A value of 0.5 for instance, would produce a half sized window. A value of 2.0 will produce a double size window. Note that the ho,vo,ss numbers must be specified as a single string (no space between the numbers and the comma).
For example, to create a double sized test window at the top right of the screen, use -P 1,0,2 .
The -F flag causes the while screen behind the test window to be masked with black. This can aid black accuracy when measuring CRT displays or projectors.
-n When running on a UNIX based system that used the X11 Windowing System, dispcal normally selects the override redirect so that the test window will appear above any other windows on the display. On some systems this can interfere with window manager operation, and the -n option turns this behaviour off.
The -N option disables the automatic calibration of an instrument if it is possible to do so. Sometimes it is awkward to have to re-calibrate and instrument every time a tool starts, and unnecessary if the instrument has recently been calibration, and this switch prevents it happening.
The -H option on high resolution spectral mode, if the instrument supports it, such as the Eye-One Pro. See Operation of particular instruments for more details. This may give better accuracy for display measurements.
The -V option uses adaptive emission measurement mode, if the instrument supports it, such as the Eye-One Pro. This may give better accuracy for low level measurements, but may be more inconsistent overall due to the varying integration times. Overall measurement time will probably be longer.
The -C "command" option allows a method of relaying each test value to some other display than that on the system running dispcal (for instance, a photo frame, PDA screen etc.), by causing the given command to be invoked to the shell, with six arguments. The first three arguments are the RGB test color as integers in the range 0 to 255, the second three parameters are the RGB test color as floating point numbers in the range 0.0 to 1.0. The script or tool should relay the given color to the screen in some manner (e.g. by generating a raster file of the given color and sending it to the display being profiled), before returning. Note that a test window will also be created on the system running dispread.
The -o flag allows specifying a tristimulus observer, and is used to compute tristimulus values from spectral readings. The following choices are available:
1931_2 selects the standard CIE 1931 2 degree observer. The default.
1964_10 selects the standard CIE 1964 10 degree observer.
1955_2 selects the Stiles and Birch 1955 2 degree observer
1978_2 selects the Judd and Voss 1978 2 degree observer
shaw selects the Shaw and Fairchild 1997 2 degree observer
The -s steps parameter overrides the default number of test patch steps used in measuring a colorimeter & display combination. The steps are those out of every combination of R,G & B values of the given number of steps that have at least one colorant at 100%. So 2 steps gives 7 test patches, 3 gives 19, 4 gives 37, 5 gives 61, 6 gives 91 etc.
The -W n|h|x parameter overrides the default serial communications flow control setting. The value n turns all flow control off, h sets hardware handshaking, and x sets Xon/Xoff handshaking. This commend may be useful in workaround serial communications issues with some systems and cables.
The -D flag causes communications and other instrument diagnostics to be printed to stdout. A level can be set between 1 .. 9, that may give progressively more verbose information, depending on the instrument. This can be useful in tracking down why an instrument can't connect.
The -I parameter allows setting of the display description string in the resulting ccmx file. Since the default display description is probably very generic, it is highly recommended that a description of the make and model of the display be provided here. The default or given display description will be printed before the menu. With most command line shells, it will be necessary to enclose the parameter with double quotes, so that spaces and other special characters are included in the parameter, and not mistaken for the start of another flag, or as a final command line parameters.
The -E parameter allows overriding the ccmx files overall description tag. Normally this is not necessary. With most command line shells, it will be necessary to enclose the parameter with double quotes, so that spaces and other special characters are included in the parameter, and not mistaken for the start of another flag, or as a final command line parameter.
The correction.ccmx is the name of the file to save the resulting Colorimeter Correction Matrix to. It is best to give it a short but informative name that includes the Colorimeter model and the display make and model. By convention it should have a .ccmx file extension.

Unlike the other measurement utilities, ccmxmake doesn't connect to the instrument until it is about to make a measurement. This allows for the possibility of using a different instrument for each measurement.
It will display a menu:
Press 1 .. 4:
1) Select an instrument, Currently 1 'usb:/bus4/dev2/ (GretagMacbeth i1 Pro)'
2) Measure test patches with current instrument
3) [ Compute Colorimeter Correction Matrix & save it ]
4) Exit
There are two measurements to be made, after which the correction matrix can be computed and saved. Before each measurement, the instrument may need calibrating.
One measurement needs a spectral instrument.
The other measurement needs the Colorimeter that the correction matrix is being created for.
There will be a message before the menu indicating which of the measurements has been completed.