Thursday, January 6, 2011

Calibrating a Display Using ArgyllCMS under Linux

Calibrating a display using ArgyllCMS, which is a pretty high-end color management system and (AFAIK) the only serious tool to calibrate a display under Linux, is, shall we say, an adventure. Here are my notes on doing it so I don't have to figure out everything again when I recalibrate again down the road. These were created by walking through the documentation's Profiling Displays scenario and also looking at the docs for each individual program.

Anyway, here's the steps I followed.

0. cd to a directory where you can store some temporary files.

I leave the final profile here too.

1. Make sure you can talk to your display properly.
dispwin
dispwin -?
The latter will list appropriate arguments for -d in later tools (specifying which of multiple displays to work with). In my case the tool saw both displays, but X11 limitations mean I can only work with display 1.
dispwin -c

This clears the active monitor profile. It's unclear to me whether this is actually needed, but it seems like a good idea.

2. Calibrate colorimeter (optional)

If you have a wide-gamut display and your calibration instrument is a colorimeter (you probably know if you have a spectrometer, as they're significantly more expensive), a CCMX colorimeter calibration file is helpful, if you have access to one. Creating one of these requires buying, borrowing, renting, or stealing an expensive spectrometer; fortunately, my upstairs neighbor has one and was kind enough to lend it to me (thanks Doug!).

Graeme Gill (ArgyllCMS creator) keeps a database of contributed CCMX files, though there appears to be some disagreement about whether variation between colorimeters and displays prevents these files from being useful to others.

If you do not have or need a CCMX file, then omit the -X arguments below.

Connect both the colorimeter and spectrometer and say:
ccmxmake -v -d1 -yl -s4 -I "HP LP2475w" reids_huey_x_lp2475w.ccmx 

Note that since the .ccmx file is of general use for future recalibrations, I put it in a common directory and not with the profile.

3. Adjust and calibrate your display.

In this step, you'll tweak your display's physical controls and measure its response to specific color inputs.

Plug in the calibration instrument and attach it when the software asks you to. Be wary of the suction cups coming off at inopportune times.
dispcal -v -d1 -yl -X foo.ccmx -t6500 -b110 hp
This sets adjustment targets of color temperature 6500K and luminance 110 cd/m^2. As far as I can tell, choosing these targets is voodoo, so these two are somewhat arbitrary.

Mess with options 1-5 until you're happy (I haven't yet figured out what values indicate a "good enough" adjustment), then choose option 7 and watch the pretty colors.

This will emit a file named hp.cal.

4. Create test patches for profiling.

It is useful to have a "close" or old profile handy, here called old-hp.icc. (The docs refer to a .icm file, but this worked fine.)
targen -v -d3 -f500 -c hp-old.icc hp
Note -d does not indicate a display number, but rather the colorant type (3 is Video RGB).

This will emit a file hp.ti1.

5. Measure the display's response to the test patches.
dispread -v -d1 -yl -X foo.ccmx -k hp.cal hp
This will show a bunch of patches on the screen and produce a file hp.ti3. It takes a little while.

6. Create the display's profile.
colprof -v -D "HP LP2475w 2011-01-06 night" -as hp
This produces a file hp.icc and prints a report of the profile's error. I'm not sure how to interpret the numbers to know if it's a good profile.

7. Install the display profile.

For me, that's four places:
  • Run the command dispwin -d1 -I /storage/photos/cms/argyll-1.3.2_20110105/hp.icc
  • Place that command in .xinitrc
  • Tell GIMP about the profile (File -> Preferences -> Color Management -> Monitor profile)
  • Tell Bibble about the profile (in the same place, believe it or not)
The end!

Updates:

1/9/2011 – remove CCMX arguments, change color temperature & luminosity, add dispwin -c.
2/2/2011 - add CCMX creation step.
2/12/2011 - change luminance target to 110

No comments:

Post a Comment