Here is a log of the process, from Terminal output:
KT-Laptop-3:Debug kirkt$ dcraw -v -r 1 1 1 1 -o 0 -H 0 -T -6 -W -g 1 1 /Users/kirkt/Desktop/dcamprof/Debug/_MG_0044.CR2
Loading Canon EOS 5D Mark III image from /Users/kirkt/Desktop/dcamprof/Debug/_MG_0044.CR2 ...
Scaling with darkness 2047, saturation 15488, and
multipliers 1.000000 1.000000 1.000000 1.000000
AHD interpolation...
Building histograms...
Writing data to /Users/kirkt/Desktop/dcamprof/Debug/_MG_0044.tiff ...
KT-Laptop-3:Debug kirkt$ scanin -v -dipn target.tif ColorChecker.cht cc24_ref.cie
TIFFFetchNormalTag: Warning, ASCII value for tag "ImageDescription" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFFFetchNormalTag: Warning, ASCII value for tag "Make" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFFFetchNormalTag: Warning, ASCII value for tag "Model" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored.
Input file 'target.tif': w=2356, h=1562, d = 3, bpp = 16
Data input file 'cc24_ref.cie'
Data output file 'target.ti3'
Chart reference file 'ColorChecker.cht'
Creating diagnostic tiff file 'diag.tif'
About to allocate scanrd_ object
Verbosity = 2, flags = 0x42a01
About to read input tiff file and discover groups
adivval = 1.000000
About to calculate edge lines
379 useful edges out of 482
About to calculate rotation
Mean angle = -0.220790
Standard deviation = 1.164465
Robust mean angle = -0.189701 from 356 lines
About to calculate feature information
About to read reference feature information
Read of chart reference file succeeded
About to match features
Checking xx
Checking yy
Checking xy
Checking yx
Checking xix
Checking yiy
Checking xiy
Checking yix
Axis matches for each possible orientation:
0: xx = 0.320776, yy = 0.306004, xx.sc = 0.134631, yy.sc = 0.135603
90: xiy = 0.225432, yx = 0.351580, xiy.sc = 0.389820, yx.sc = 0.088742
180: xix = 0.301947, yiy = 0.347327, xix.sc = 0.134340, yiy.sc = 0.134642
270: xy = 0.224873, yix = 0.351576, xy.sc = 0.257560, yix.sc = 0.088742
r0 = 0.440145, r90 = 0.095076, r180 = 0.459195, r270 = 0.143794
There are 2 candidate rotations:
cc = 0.440145, irot = -0.189701, xoff = -49.567580, yoff = -74.423086, xscale = 7.427721, yscale = 7.374475
cc = 0.459195, irot = 179.810299, xoff = -2416.435540, yoff = -1602.952441, xscale = 7.443805, yscale = 7.427127
About to compute match transform for rotation -0.189701 deg.
About to setup value scanrdg boxes
About to read raster values
About to compute expected value correlation
About to compute match transform for rotation 179.810299 deg.
About to setup value scanrdg boxes
About to read raster values
About to compute expected value correlation
Expected value distance values are:
0, rot -0.189701: 2410.510929
1, rot 179.810299: 3842.704025
Chosen rotation -0.189701 deg. as best
About to compute final match transform
Improve match
About to setup value scanrdg boxes
About to read raster values
About to write diag file
Writing output values to file 'target.ti3'
KT-Laptop-3:Debug kirkt$ dcamprof make-profile target.ti3 profile.json
Reading target and generating values for the calibration illuminant D50...
Re-generating target reference XYZ values for illuminant D50...
Making camera profile...
Finding a camera raw RGB to CIE XYZ matrix for illuminant D50...
Whitest patch in target differs DE 1.18 from calibration illuminant,
close enough to calculate whitepoint preservation.
Inverting to get ColorMatrix:
{
"ColorMatrix1": [
[ 0.729155, -0.155578, -0.066452 ],
[ -0.482378, 1.364639, 0.172933 ],
[ -0.111882, 0.237018, 0.685179 ]
]
}
Matrix patch match average DE 1.38, DE LCh 0.61 0.63 0.97
mean DE 1.24, DE LCh 0.50 0.51 0.69
p90 DE 2.32, DE LCh 1.28 1.15 1.90
max DE 4.06, DE LCh 1.92 1.90 3.94
ColorMatrix optimal white balance for target: 0.478142,1,0.660402
Using previously calculated RGB to XYZ D50 matrix.
Applying white-balance to get ForwardMatrix:
{
"ForwardMatrix1": [
[ 0.738497, 0.156947, 0.072765 ],
[ 0.257033, 0.850257, -0.107290 ],
[ 0.031675, -0.268494, 1.049609 ]
]
}
Matrix patch match average DE 1.58, DE LCh 0.96 0.59 0.98
mean DE 1.48, DE LCh 0.91 0.60 0.69
p90 DE 2.58, DE LCh 1.83 1.05 1.91
max DE 4.23, DE LCh 2.40 1.78 3.95
ForwardMatrix optimal white balance for target: 0.478142,1,0.660402
Making 2.5D chromaticity-addressed lookup table for XYZ correction...
25.00% of the patches was put in a chromaticity group due to nearby neighbor.
Largest chromaticity group contains 6 patches. Patch count reduced from
24 to 18. Note that patch matching cannot reach 100% when chromaticity
groups are formed, as the LUT matches the average within a group.
Native LUT patch match average DE 0.37, DE LCh 0.14 0.15 0.23
mean DE 0.00, DE LCh 0.00 0.00 0.00
p90 DE 1.21, DE LCh 0.48 0.60 0.81
max DE 1.89, DE LCh 1.19 0.95 1.80
5 worst patches for Overall DE:
0 RGB 0.077 0.106 0.054 => XYZ 0.127 0.111 0.055 (0.130 0.114 0.054) DE 1.89 DE LCh 0.57 0.04 1.80 (dark brown)
18 RGB 0.484 1.000 0.652 => XYZ 0.965 1.000 0.779 (0.948 0.978 0.773) DE 1.40 DE LCh 0.48 0.95 0.90 (white)
23 RGB 0.019 0.041 0.027 => XYZ 0.034 0.035 0.029 (0.039 0.040 0.033) DE 1.21 DE LCh 1.19 0.23 0.05 (gray 20%)
20 RGB 0.194 0.408 0.267 => XYZ 0.380 0.394 0.320 (0.382 0.398 0.318) DE 1.02 DE LCh 0.19 0.89 0.46 (gray 70%)
22 RGB 0.048 0.103 0.068 => XYZ 0.094 0.098 0.081 (0.096 0.101 0.082) DE 1.02 DE LCh 0.42 0.60 0.71 (gray 40%)
5 worst patches for Lightness DE:
23 RGB 0.019 0.041 0.027 => XYZ 0.034 0.035 0.029 (0.039 0.040 0.033) DE 1.21 DE LCh 1.19 0.23 0.05 (gray 20%)
0 RGB 0.077 0.106 0.054 => XYZ 0.127 0.111 0.055 (0.130 0.114 0.054) DE 1.89 DE LCh 0.57 0.04 1.80 (dark brown)
18 RGB 0.484 1.000 0.652 => XYZ 0.965 1.000 0.779 (0.948 0.978 0.773) DE 1.40 DE LCh 0.48 0.95 0.90 (white)
22 RGB 0.048 0.103 0.068 => XYZ 0.094 0.098 0.081 (0.096 0.101 0.082) DE 1.02 DE LCh 0.42 0.60 0.71 (gray 40%)
19 RGB 0.319 0.671 0.440 => XYZ 0.622 0.645 0.521 (0.628 0.654 0.525) DE 0.64 DE LCh 0.28 0.58 0.03 (gray 80%)
5 worst patches for Chroma DE:
18 RGB 0.484 1.000 0.652 => XYZ 0.965 1.000 0.779 (0.948 0.978 0.773) DE 1.40 DE LCh 0.48 0.95 0.90 (white)
20 RGB 0.194 0.408 0.267 => XYZ 0.380 0.394 0.320 (0.382 0.398 0.318) DE 1.02 DE LCh 0.19 0.89 0.46 (gray 70%)
22 RGB 0.048 0.103 0.068 => XYZ 0.094 0.098 0.081 (0.096 0.101 0.082) DE 1.02 DE LCh 0.42 0.60 0.71 (gray 40%)
19 RGB 0.319 0.671 0.440 => XYZ 0.622 0.645 0.521 (0.628 0.654 0.525) DE 0.64 DE LCh 0.28 0.58 0.03 (gray 80%)
21 RGB 0.102 0.215 0.141 => XYZ 0.202 0.210 0.171 (0.202 0.210 0.168) DE 0.78 DE LCh 0.06 0.32 0.71 (gray 50%)
5 worst patches for Hue DE:
0 RGB 0.077 0.106 0.054 => XYZ 0.127 0.111 0.055 (0.130 0.114 0.054) DE 1.89 DE LCh 0.57 0.04 1.80 (dark brown)
18 RGB 0.484 1.000 0.652 => XYZ 0.965 1.000 0.779 (0.948 0.978 0.773) DE 1.40 DE LCh 0.48 0.95 0.90 (white)
1 RGB 0.253 0.363 0.201 => XYZ 0.424 0.382 0.204 (0.422 0.378 0.206) DE 0.84 DE LCh 0.22 0.03 0.81 (red)
21 RGB 0.102 0.215 0.141 => XYZ 0.202 0.210 0.171 (0.202 0.210 0.168) DE 0.78 DE LCh 0.06 0.32 0.71 (gray 50%)
22 RGB 0.048 0.103 0.068 => XYZ 0.094 0.098 0.081 (0.096 0.101 0.082) DE 1.02 DE LCh 0.42 0.60 0.71 (gray 40%)
5 best patches for Overall DE:
16 RGB 0.187 0.186 0.183 => XYZ 0.325 0.223 0.259 (0.325 0.223 0.259) DE 0.00 DE LCh 0.00 0.00 0.00 (purple-red)
3 RGB 0.071 0.154 0.065 => XYZ 0.123 0.141 0.056 (0.123 0.141 0.056) DE 0.00 DE LCh 0.00 0.00 0.00 (yellow-green)
2 RGB 0.089 0.249 0.219 => XYZ 0.189 0.211 0.284 (0.189 0.211 0.284) DE 0.00 DE LCh 0.00 0.00 0.00 (purple-blue)
14 RGB 0.152 0.093 0.045 => XYZ 0.224 0.134 0.041 (0.224 0.134 0.041) DE 0.00 DE LCh 0.00 0.00 0.00 (red)
9 RGB 0.048 0.078 0.084 => XYZ 0.090 0.073 0.117 (0.090 0.073 0.117) DE 0.00 DE LCh 0.00 0.00 0.00 (dark purple)
Writing output to "profile.json"...
Complete!
dcamprof make-dcp -c "Canon EOS 5D Mark III" profile.json testprofile.dcp
In the next post, I will post a Dropbox link with a ZIP archive of all of the files I used in this process.
kirk