Camera Profiling
Shooting the IT8 target
- Shot under household LED lighting, marked as 4000 K (approx.) on the bulb
- Shot a white balance card
- Shot 4 pictures of the chart, rotating it by 90° each time
- All camera settings were kept fully manual and fixed
Processing RAW (CR3) images in RawTherapee
- Apply demosaicing
- Apply white balance using the reference from the white card shot
- Apply perspective correction and cropping to keep the chart straight (ish)
- Export a linear TIFF reference image with white balance enabled
Scanning the reference files
Using ArgyllCMS scanin. Auto-recognition sometimes works, but not in this case, so I use the -F option for all reference files:
scanin -v -dpin -F 307,306,5047,293,5006,2855,293,2855 Target_0.tif ../Chart/IT8/IT8.cht ../Chart/IT8/IT8.cie Target_0_diag.tif
scanin -v -dpin -F 219,270,3925,263,3944,2609,246,2601 Target_90.tif ../Chart/IT8/IT8.cht ../Chart/IT8/IT8.cie Target_90_diag.tif
scanin -v -dpin -F 307,287,4724,299,4681,2660,292,2665 Target_180.tif ../Chart/IT8/IT8.cht ../Chart/IT8/IT8.cie Target_180_diag.tif
scanin -v -dpin -F 218,277,3873,275,3910,2580,274,2591 Target_270.tif ../Chart/IT8/IT8.cht ../Chart/IT8/IT8.cie Target_270_diag.tif
This produces four .ti3 files.
The next step is to average or take the median to compensate for possible reading errors or glare.
ArgyllCMS provides an average command, but it does not work on these files:
average Target_0.ti3 Target_90.ti3 Target_180.ti3 Target_270.ti3 Target_avg.ti3
Result:
average: Error - File 'Target_90.ti3' set 1 has field 'RGB_R' value that differs from 'Target_0.ti3'
So I did the averaging manually in a spreadsheet, producing two outputs:
Target_avg.ti3(mean)Target_med.ti3(median)
While in the spreadsheet, I also determined the “best” single shot by averaging all STDEV fields.
The lowest overall STDEV corresponds to Target_270, which I also keep for comparison with the average and median datasets.
Creating ICC profiles for the camera
I created multiple camera ICC profiles using both colprof and dcamprof:
dcamprof make-profile -i 4000K -t linear -g ../Chart/IT8/IT8_layout.json -s Target_avg.ti3 Target_avg_dcamprof.icc
dcamprof make-profile -i 4000K -t linear -g ../Chart/IT8/IT8_layout.json -s Target_med.ti3 Target_med_dcamprof.icc
dcamprof make-profile -i 4000K -t linear -g ../Chart/IT8/IT8_layout.json -s Target_270.ti3 Target_270_dcamprof.icc
Best ΔE results:
- ColorMatrix:
- Average: 1.47
- Median: 1.58
- Target_270: 3.23
- ForwardMatrix:
- 1.41, 1.56, 3.12 (same order)
- Same ranking for LUT-based profiles
Following the ArgyllCMS documentation for profiling a printer using a scanner or camera as a “poor man’s colorimeter”, it states:
“For the purposes of a poor man’s colorimeter, the following would generally be used.”
So I generated LUT-based camera profiles with colprof:
colprof -v -qh -ax -ua -O Target_avg_colprof_hxua.icc Target_avg # peak err = 6.70, avg err = 0.71
colprof -v -qh -ax -ua -O Target_med_colprof_hxua.icc Target_med # peak err = 8.60, avg err = 1.04
colprof -v -qh -ax -ua -O Target_270_colprof_hxua.icc Target_270 # peak err = 8.14, avg err = 1.26
The documentation also states:
“If profiling a camera in RAW mode, then there may be some advantage in creating a pure matrix-only profile.”
So I tried matrix-only profiles at ultra quality, keeping the -ua flag as recommended:
colprof -v -qu -am -ua -O Target_avg_colprof_umua.icc Target_avg # peak err = 14.08, avg err = 2.77
colprof -v -qu -am -ua -O Target_med_colprof_umua.icc Target_med # peak err = 15.38, avg err = 2.87
colprof -v -qu -am -ua -O Target_270_colprof_umua.icc Target_270 # peak err = 16.44, avg err = 3.18
These matrix-only profiles do not look very good in ICC profile viewers: they appear chaotic, and I do not understand why.
Printer Profiling
Generating and printing the target
I generated a 1026-patch target to fit on a single A4 page and exported it as a TIFF file, then printed it with no color profile applied by the system.
Following the ArgyllCMS guide:
targen -v -l260 -f1026 Printer
printtarg -t -v -s -iSS -pA4R Printer
Shooting the target and generating reference files
Same workflow as for camera profiling, but with only two shots (0° and 180°), since the paper is matte and less prone to glare.
Processing in RawTherapee was identical.
Scanning the patches
This is where I am unsure which previously created camera profile should be used to generate the .ti3 files.
Using the LUT-based camera profile:
scanin -v -c -dpin -F 42,35,5738,50,5744,3890,54,3891 Chart_0.tif Printer.cht ../Camera/Target_avg_colprof_hxua.icc Printer Chart_0_diag.tif
mv Printer.ti3 Printer_0.ti3
scanin -v -c -dpin -F 17,37,5730,45,5733,3902,38,3881 Chart_180.tif Printer.cht ../Camera/Target_avg_colprof_hxua.icc Printer Chart_180_diag.tif
mv Printer.ti3 Printer_180.ti3
Averaging works here:
average -v Printer_0.ti3 Printer_180.ti3 Printer.ti3
mv Printer.ti3 Printer_avg_hxua.ti3
Repeating the same process with the matrix-only camera profile:
scanin -v -c -dpin -F 42,35,5738,50,5744,3890,54,3891 Chart_0.tif Printer.cht ../Camera/Target_avg_colprof_umua.icc Printer Chart_0_diag.tif
mv Printer.ti3 Printer_0.ti3
scanin -v -c -dpin -F 17,37,5730,45,5733,3902,38,3881 Chart_180.tif Printer.cht ../Camera/Target_avg_colprof_umua.icc Printer Chart_180_diag.tif
mv Printer.ti3 Printer_180.ti3
average -v Printer_0.ti3 Printer_180.ti3 Printer.ti3
mv Printer.ti3 Printer_avg_umua.ti3
Creating the printer profiles
colprof -v -qm -S sRGB.icm -cmt -dpp Printer_avg_umua # peak err = 3.57, avg err = 0.63, RMS = 0.77
colprof -v -qm -S sRGB.icm -cmt -dpp Printer_avg_hxua # peak err = 3.69, avg err = 0.62, RMS = 0.75
Results
Soft-proofing with these ICC profiles shows very little difference, and printing with them does not show significant visual differences either.
What is going on here?