dispread

## spectro/dispread

### Summary

Display test patches on a monitor, read the colorimetric value result with the colorimeter, and create the chart readings file. The type of instrument is determined by the communication port selected. Emission and display measurement instruments are supported.
If you want to read a display manually rather than automatically, see chartread and the -d option.

### Usage

dispread [-options] inoutfile
-v Verbose mode
-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)
-d web[:port] Display via a web server at port (default 8080)
`-d cc[:n]` `Display via n'th ChromeCast (default 1, ? for list)
` -d madvr [MSWin] Display via MadVR Video Renderer
-d dummy Dummy (non-existant, invisible) display
-c listno Set communication port from the following list (default 1)
-p Use telephoto mode (ie. for a projector, if available)
-a Use ambient mode (ie. for a projector, if available)
-y X Display type - instrument specific list to choose from.
- k file.cal Load calibration file into display while reading
- K file.cal Apply calibration file to test values while reading
`-V [MSWin] Enable MadVR color management (3dLut)`
-s Save spectral information (default don't save)
-P ho,vo,ss[,vs] 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.
ss,vs: = optional horizontal, vertical scale.
-F Fill whole screen with black background
-E Video encode output as (16-235)/255 "TV" levels
-Z nbits Quantize test values to fit in nbits
-n [X11 only] Don't set override redirect on test window
-J Run calibration first (used rarely)
-N Disable initial calibration of instrument if possible
-H Use high resolution spectrum mode (if available)
-w Disable normalisation of white to Y = 100
-X file.ccmx Apply Colorimeter Correction Matrix
-X file.ccss Use Colorimeter Calibration Spectral Samples for calibration
-Q observ Choose CIE Observer for spectrometer or CCSS colorimeter data:
1931_2 (def.), 1964_10, `2012_2, 2012_10,` S&B 1955_2, shaw, J&V 1978_2, 1964_10c or file.cmf
-I b|w Drift compensation, Black: -Ib, White: -Iw, Both: -Ibw
`-Y R:rate Override measured refresh rate with rate Hz
` -Y A Use non-adaptive integration time mode (if available).
-Y p Don't wait for the instrument to be placed on the display
-Y k Omit the file.cal information from the .ti3 file
-C "command" Invoke shell "command" each time a color is set
-M "command" Invoke shell "command" each time a color is measured
-x x Take manually entered XYZ values
-W n|h|x Override serial port flow control: n = none, h = HW, x = Xon/Xoff
-D [level] Print debug diagnostics to stderr
inoutfile Base name for input[.ti1]/output[.ti3] file.
Examples
dispread mydisplay

### Comments

This is the tool for exercising a display, in order to measure its color characteristics. The device test colors are defined by the outfile.ti1 file, while the resulting device+colorimetric and optional spectral readings are stored in the outfile.ti3 file. Display calibration curves can be applied during the measurements, and the curves included in the resulting .ti3 data file using the -kflag. See dispcal for information on how to calibrate the display before profiling it. For best results, you should run this against a neutral grey desktop background, and avoid having any bright images or windows on the screen at the time you run it.
The -v flag reports progress information.
-display: When running on a UNIX based system that used the X11 Windowing System, dispread 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.
-d: 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 dispread so as to display the usage information (i.e. "dispread -?" or "dispread --"), 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 -display parameter.
On X11 the inability to access VideoLUTs could be because you are trying to access a remote display, and the remote display doesn't support the XF86VidMode extension, or perhaps you are running multiple monitors using NVidia TwinView, or MergedFB, and trying to access anything other than the primary monitor. TwinView and MergedFB don't properly support the XF86VidMode extension for multiple displays. You can use dispwin -r to test whether the VideoLUTs are accessible for a particular display. See also below, on how to select a different display for VideoLUT access. Also note that dispcal will fail if the Visual depth doesn't match the VideoLUT depth. Typically the VideoLUTs have 256 entries per color component, so the Visual generally needs to be 24 bits, 8 bits per color component.
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. You may be able to calibrate one screen, and then share the calibration with another screen. Profiling can be done independently to calibration.
-dweb or -dweb:port starts a standalone web server on your machine, which then allows a local or remote web browser to display the the color test patches. By default port 8080 is used, but this can be overridden by appending a : and the port number i.e. -dweb:8001. The URL will be http:// then name of the machine or its I.P. address followed by a colon and the port number - e.g something like http://192.168.0.1:8080. If you use the verbose option (-v) then a likely URL will be printed once the server is started, or you could run ipconfig (MSWin) or /sbin/ifconfig (Linux or OS X) and identify an internet address for your machine that way. JavaScript needs to be enabled in your web browser for this to work. You may have to modify any firewall to permit port 8080 to be accessed on your machine.
Note that if you use this method of displaying test patches, that there is no access to the display VideoLUTs and that the colors will be displayed with 8 bit per component precision, and any screen-saver or power-saver will not be disabled. You will also be at the mercy of any color management applied by the web browser, and may have to carefully review and configure such color management. See the -o flag for an explanation of the implications of having no access to the VideoLUTs.
-dcc or -dcc:no causes test patches to be displayed using and available ChromeCast to your TV. Use -dcc:? to display a list of ChromeCasts on your local network. Note that the ChromeCast as a test patch source is probably the least accurate of your choices, since it up-samples the test patch and transforms from RGB to YCC and back, but should be accurate within ± 1 bit. You may have to modify any firewall to permit port 8081 to be accessed on your machine if it falls back to the Default receiver (see installation instructions for your platform).
-dmadvr [MSWin only] causes test patches to be displayed using the MadVR video renderer. Note that will have to start MadTPG before running dispread, and that while you can adjust the "Test Pattern Configuration" controls, you should not normally alter the "Existing Calibration" controls, as dispread will set these appropriately. See also `-V flag.
`
-ddummy causes test patches not to be displayed at all. This is useful when used with the these appropriately. This is useful when patch values are going to be displayed via the -C option.
``
-c: The instrument is assumed to communicate through a USB or serial communication port, and the port can be selected with the -c option, if the instrument is not connected to the first port. If you invoke dispread so as to display the usage information (i.e. "dispread -?" or "dispread --"), then the discovered USB and serial ports will be listed. On UNIX/Linux, a list of all possible serial ports are shown, but not all of them may actually be present on your system.
The -p flag allows measuring in telephoto mode, using instruments that support this mode, e.g. the ColorMunki. Telephoto mode is one for taking emissive measurements from a distance (ie. telespectometer, tele-colorimeter) mode, and typically would be used for measuring projector type displays. If a device does not support a specific telephoto mode, then the normal emissive mode may be suitable for measuring projectors.
The -a flag allows measuring in ambient mode, using instruments that support this mode. This typically would be used for measuring projector type displays when the light levels reflected from the projection surface are very low. Note that this means that the color value will not be quite as accurate, because the effect the projection surface has on the color is not taken into account.
The -y flag allows setting the Display Type. The selection typically determines two aspects of of the instrument operation: 1) It may set the measuring mode to suite refresh or non-refresh displays. Typically only LCD (Liquid Crystal) displays have a non-refresh nature. 2) It may select an instrument calibration matrix suitable for a particular display type. The selections available depends on the type and model of instrument, and a list of the options for the discovered instruments will be shown in the usage information. For more details on what particular instruments support and how this works, see Operation of particular instruments. 3) Any installed CCSS files (if applicable), or CCMX files. These files are typically created using ccxxmake, and installed using oeminst. The default and Base Calibration types will be indicated in the usage.
-s: By default only the colorimetric information (XYZ value) will be saved, but for instruments that support spectral readings (such as the Gretag Spectrolino), the -s option will save the spectral readings to the .ti3 file as well.
-k: If a display video lookup table calibration .cal file is provided, it will be loaded into the display VideoLUTs while the measurements are being taken, thereby being applied to the measurement values, and the calibration will also included in the resulting .ti3 data file, so that colprof can include it as a vcgt tag in the resulting profile. This is the normal way to profile a calibrated display. The calibration file has usually been created using dispcal. If the calibration file indicates that the displays VideoLUTs are not accessible, or if they prove not to be accessible, then dispread will switch to -K mode (see below). If a calibration file is not supplied using -k or -K, then the display will be measured in whatever calibration state it is in, and no calibration information is saved to the resulting .ti3 file.
If the calibration file provided created using video range encoding (dispcal -E), then the -E option in dispread will be triggered automatically.
NOTE that the calibration is loaded into the display hardware just before the instrument starts measurement, after the test window first appears.
See also the -Y k flag.
-K: If a display video lookup table calibration .cal file is provided, it will be applied to the test values for each measurement, and also included in the resulting .ti3 data file, so that colprof can include it as a vcgt tag in the resulting profile. This is NOT normally the best way to profile a calibrated display, since the frame buffer may have lower precision than the VideoLUTs output values. This is the way calibration should be applied if MadVR is being used to display the test patches. If a calibration file is not supplied using -k or -K, then the display will be measured in whatever calibration state it is in, and no calibration information is saved to the resulting .ti3 file.
If the calibration file provided created using video range encoding (dispcal -E), then the -E option in dispread will be triggered automatically.
See also the -Y k flag.
-V: [MSWin] If using MadVR to display test patches, then enable Color Managenent (3dLut). This would be used for verification measurement.
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, or 10% of the width of the display if the display size is unknown. 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. If three parameters are provided, then 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. If four parameters are provided, then the last two set independent horizontal and vertical scaling factors. Note that the ho,vo,ss or ho,vo,hs,vs 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 . To create a window twice as wide as high: -P 1,0,2,1.
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.
The -E flag causes the test values to be scaled to the Video RGB encoding range of 16/255 to 235/255. If the calibration file provided using the -k or -K flag was created using video range encoding, then this option will be triggered automatically. This will also set quantization of 8 bits (see -Z flag below). If your video connection is better than 8 bits (ie. 10 or 12 bits), then you may wish to raise this default.
-Z nbits Normally the target device values are floating point numbers that may get rounded and quantized in the process of printing them or reproducing them on the display device. If some of this quantization can be accounted for, it may improve the accuracy of the resulting profile, and the Q parameter allows this quantization to be specified. The parameter is the number of binary digits (bits) that the device values should be quantized to. An idea of the number of bits of precision that makes its way to your display can be obtained by using dispcal -R If Video encoding is selected (see -E flag above), then 8 bits is selected by default. On systems using an VGA connection or Display Port with a graphics card with VideoLUT entries with greater than 8 bits depth, or if using the MadVR rendered with dithering, then a higher bit depth is typically possible.
-n: When running on a UNIX based system that used the X11 Windowing System, dispread 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 -J option runs through the black and sensor relative calibration routines for the Xrite DTP92 and DTP94 instrument, the black level calibration for the Eye-One Display 1, and a CRT frequency calibration for the Eye-One Display 2. For the black calibration the instrument should be placed on an opaque, black surface, and any stray light should be avoided by placing something opaque over the instrument. If a Spectrolino is being used, then a white and black calibration will always be performed before the instrument can be placed on the display, unless the -N flag is used. Generally it is not necessary to do a calibration every time an instrument is used, just now and again. There is no point in doing a CRT frequency calibration, as this will be done automatically at the commencement of patch reading.
-N Any instrument that requires regular calibration will ask for calibration on initial start-up. Sometimes this can be awkward if the instrument is being mounted in some sort of measuring jig, or annoying if several sets of readings are being taken in quick succession. The -N suppresses this initial calibration if a valid and not timed out previous calibration is recorded in the instrument or on the host computer. It is advisable to only use this option on the second and subsequent measurements in a single session.
The -H option turns on high resolution spectral mode, if the instrument supports it. See Operation of particular instruments for more details. This may give better accuracy for display measurements.
The -w flag disables the normalisation of the white patch value to 100.0, resulting in values that are in cd/m^2. This is mainly for diagnostic purposes.
The -X file.ccmx option reads a Colorimeter Correction Matrix from the given file, and applies it to the colorimeter instruments readings. This can improve a colorimeters accuracy for a particular type of display. A list of contributed ccmx files is here.
The -X file.ccss option reads a Colorimeter Calibration Spectral Sample from the given file, and uses it to set the colorimeter instruments calibration. This will only work with colorimeters that rely on sensor spectral sensitivity calibration information (ie. the X-Rite i1d3, or the DataColor Spyder4 & Spyder 5).This can improve a colorimeters accuracy for a particular type of display. A list of contributed ccss files is here.
The -Q flag allows specifying a tristimulus observer, and is used to compute PCS (Profile Connection Space) tristimulus values from spectral readings or using a colorimeter that has CCSS capability. 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.
2012_2 selects the proposed CIE 2012 2 degree observer
2012_10 selects the proposed CIE 2012 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
1964_10c selects a version of the CIE 1964 10 degree observer that has been adjusted using a 3x3 matrix to better agree with the 1931 2 degree observer.
file.cmf selects an observer specified by the given .cmf file.
NOTE that if you select anything other than the default 1931 2 degree observer, that the Y values will not be cd/m^2, due to the Y curve not being the CIE 1924 photopic V(λ) luminosity function.
The -I b|w options invoke instrument black level, and display white level compensation (respectively). Instrument black level drift compensation attempts to combat instrument black calibration drift by using a display black test patch as a reference. If an instrument is not acclimatised sufficiently to the measurement conditions, changes in temperature can affect the black readings. Display white level drift compensation attempts to combat changes in display brightness as it warms up by measuring a white patch every so often, and using it to normalise all the other readings. If just instrument black drift compensation is needed, use -Ib. If just display white level compensation is needed, use -Iw. If both are needed, use -Ibw or -Iwb.
The -Y R:rate options overrides calibration of the instrument refresh rate. This may be useful if the instrument supports this function and the refresh rate cannot be accurately calibrated from the display itself.
The -Y A option uses a non-adaptive integration time emission measurement mode, if the instrument supports it, such as the Eye-One Pro, ColorMunki, i1d3 and K10. By default an adaptive integration time measurement mode will be used for emission measurements, but some instruments support a fixed integration time mode that can be used with display devices. This may give faster measurement times, but may also give less accurate low level readings.
The -Y p option skips asking the user to place the instrument on the display. Normally a grey patch is displayed, and then the user is asked to confirm that the instrument is in place, so that readings can commence. This flag disables that check. This may be useful in automating certain operations.
The -Y k option is used, then calibration information is omitted, and the resulting profile will not have a 'vcgt' tag. Normally when calibration information is provided using the -k or -K options, this is saved to the resulting .ti3 file so that a profile can be created with a matching 'vcgt' calibration tag.
The -C "command" option allows a method of relaying each test value to some other display than that on the system running dispread (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 -M "command" option allows a method of gathering each test value from some external source, such as an instrument that is not directly supported by Argyll. The given command is involked 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 create a file called "command.meas" that contains the XYZ values for the given RGB (or measured from the test window) in cd/m^2 as three numbers separated by spaces, before returning. If the command returns a non-zero return value, dispread will abort. Note that a test window will also be created on the system running dispread.
The -x flag causes dispread to expect values to be manually entered for each reading, rather than using an instrument to do the measurements. This mode is ideal if your instrument is not supported by Argyll. XYZ values should be entered. It is possible to navigate about the test values being measured, so as to do them in any order, as well as re-do values, in case of any mistakes.
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 final parameter on the command line is the base filename for the .ti1 input file, and the .ti3 output file. dispread will add the .ti1 and .ti3 extensions automatically.
NOTE that on an X11 system, if the environment variable ARGYLL_IGNORE_XRANDR1_2 is set (ie. set it to "yes"), then the presence of the XRandR 1.2 extension will be ignored, and other extensions such as Xinerama and XF86VidMode extension will be used. This may be a way to work around buggy XRandR 1.2 implementations.

If a large number of patches is being read, the screensaver on many systems can interfere with the operation of dispread. It is therefore advisable in these cases to manually turn off the screensaver before commencing the measurements.
If communications break down with a USB connected instrument, you may have to unplug it, and plug it in again to recover.
Some systems (Apple OSX in particular) have a special set of user interface controls ("Universal Access") that allows altering the display in ways designed to assist visually impaired users, by increasing contrast etc. This will interfere badly with any attempts to calibrate or profile such a system, and must be turned off in order to do so. Note that certain magic keyboard sequences can turn this on by accident.