[argyllcms] Scanin generates .ti3 file gigabytes in size

  • From: Nic Nilov <nightnic@xxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Thu, 28 Apr 2022 13:42:40 +0300

Hi,

I was trying to create an ICC camera profile from a CC24 passport and am 
observing a weird behavior where scanin output gets stuck and the resulting 
.ti3 file keeps growing endlessly. It reached 12Gb when I terminated the 
program. The diag.tiff meanwhile is only 8 bytes in size. I'm doing this all 
under macOS Big Sur.

The command I use is the following (CC24Classic.cht comes from ArgyllCMS):

scanin -v -dipn -G 1.0 chart-raw.tiff CC24Classic.cht CC24Classic-D50.cie

The output:

Input file 'chart-raw.tiff': w=8288, h=5520, d = 3, bpp = 16
Data input file 'CC24Classic-D50.cie'
Data output file 'chart-raw.ti3'
Chart reference file 'CC24Classic.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 = 0.435010
About to calculate edge lines
6360 useful edges out of 201569
About to calculate rotation
Mean angle = 10.529630
Standard deviation = 22.782834
Robust mean angle = 2.377773 from 5204 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.161828, yy  = 0.471842, xx.sc  = 0.072456, yy.sc  = 0.038422
 90: xiy = 0.397127, yx  = 0.178383, xiy.sc = 0.039449, yx.sc  = 0.039925
180: xix = 0.164969, yiy = 0.548881, xix.sc = 0.072456, yiy.sc = 0.002581
270: xy  = 0.381656, yix = 0.172433, xy.sc  = 0.073129, yix.sc = 0.039779
r0 = 0.264514, r90 = 0.430158, r180 = 0.020416, r270 = 0.227808
bcc = 0.430158, wcc = 0.020416
There are 1 candidate rotations:
cc = 0.430158, irot = 92.377773, xoff = -5847.212293, yoff = 1836.193584, 
xscale = 25.349103, yscale = 25.046741
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 'chart-raw.ti3'
^C

The contents of the resulting 'chart-raw.ti3' (after the final `inf` there are 
just endless space characters):

CTI3

DESCRIPTOR "Argyll Calibration Target chart information 3"
ORIGINATOR "Argyll target"
CREATED "Thu Apr 28 13:20:54 2022"
DEVICE_CLASS "INPUT"
COLOR_REP "XYZ_RGB"
SPECTRAL_BANDS "106"
SPECTRAL_START_NM "380.000000"
SPECTRAL_END_NM "730.000000"

NUMBER_OF_FIELDS 116
BEGIN_DATA_FORMAT
SAMPLE_ID XYZ_X XYZ_Y XYZ_Z SPEC_380 SPEC_383 SPEC_387 SPEC_390 SPEC_393 
SPEC_397 SPEC_400 SPEC_403 SPEC_407 SPEC_410 SPEC_413 SPEC_417 SPEC_420 
SPEC_423 SPEC_427 SPEC_430 SPEC_433 SPEC_437 SPEC_440 SPEC_443 SPEC_447 
SPEC_450 SPEC_453 SPEC_457 SPEC_460 SPEC_463 SPEC_467 SPEC_470 SPEC_473 
SPEC_477 SPEC_480 SPEC_483 SPEC_487 SPEC_490 SPEC_493 SPEC_497 SPEC_500 
SPEC_503 SPEC_507 SPEC_510 SPEC_513 SPEC_517 SPEC_520 SPEC_523 SPEC_527 
SPEC_530 SPEC_533 SPEC_537 SPEC_540 SPEC_543 SPEC_547 SPEC_550 SPEC_553 
SPEC_557 SPEC_560 SPEC_563 SPEC_567 SPEC_570 SPEC_573 SPEC_577 SPEC_580 
SPEC_583 SPEC_587 SPEC_590 SPEC_593 SPEC_597 SPEC_600 SPEC_603 SPEC_607 
SPEC_610 SPEC_613 SPEC_617 SPEC_620 SPEC_623 SPEC_627 SPEC_630 SPEC_633 
SPEC_637 SPEC_640 SPEC_643 SPEC_647 SPEC_650 SPEC_653 SPEC_657 SPEC_660 
SPEC_663 SPEC_667 SPEC_670 SPEC_673 SPEC_677 SPEC_680 SPEC_683 SPEC_687 
SPEC_690 SPEC_693 SPEC_697 SPEC_700 SPEC_703 SPEC_707 SPEC_710 SPEC_713 
SPEC_717 SPEC_720 SPEC_723 SPEC_727 SPEC_730 RGB_R RGB_G RGB_B STDEV_R STDEV_G 
STDEV_B
END_DATA_FORMAT

NUMBER_OF_SETS 24
BEGIN_DATA
A01 11.93332 10.40251 5.336205 6.216271 6.216271 6.216271 6.216271 6.216271 
6.216271 6.216271 6.217102 6.216287 6.210987 6.198365 6.193641 6.212022 
6.174502 6.172292 6.202765 6.218032 6.226830 6.236910 6.256441 6.275679 
6.291612 6.307395 6.333854 6.375712 6.439284 6.514982 6.590520 6.672283 
6.753750 6.808814 6.848821 6.905240 6.920161 6.936406 6.952247 6.999840 
7.041770 7.087351 7.163943 7.253474 7.352804 7.444753 7.527161 7.610783 
7.678735 7.744531 7.808809 7.884630 7.975741 8.092729 8.242582 8.428889 
8.669200 8.983929 9.381876 9.855571 10.39121 10.97366 11.58382 12.20044 
12.80121 13.35748 13.84456 14.24665 14.56109 14.79330 14.95924 15.08202 
15.18000 15.27663 15.38575 15.50376 15.64215 15.81206 16.00174 16.20095 
16.38712 16.56900 16.73862 16.88331 17.01887 17.13608 17.23442 17.31162 
17.33425 17.30915 17.26716 17.22302 17.13926 17.06334 17.01117 16.96033 
16.95808 16.97964 17.02169 17.12801 17.23421 17.32946 17.46297 17.60171 
17.75797 17.90161 18.04272 18.22761 18.45776 2.341298 2.630627 1.082245 
2.895307 2.500502 1.580985
A02 38.37987 34.17787 18.93664 18.91074 18.91074 18.91074 18.91074 18.91074 
18.91074 18.91074 18.91210 18.90844 18.89109 18.85145 18.83581 18.89038 
18.71379 18.78635 18.97506 19.15520 19.36477 19.61954 19.90885 20.21924 
20.54717 20.92698 21.44248 22.10073 22.85615 23.69819 24.59843 25.62852 
26.73373 27.86836 29.05903 30.24963 31.37470 32.28584 33.06825 33.64698 
33.98905 34.08903 33.92544 33.38401 32.45981 31.23598 29.85619 28.48185 
27.27073 26.35503 25.79793 25.60962 25.74752 26.09034 26.44894 26.64426 
26.61541 26.44433 26.32319 26.45121 26.99987 28.08335 29.74744 31.95860 
34.61209 37.50326 40.40927 43.11959 45.49796 47.51750 49.21274 50.61809 
51.77167 52.71714 53.49541 54.16410 54.74090 55.24735 55.72460 56.22766 
56.70805 57.17063 57.63197 58.11243 58.62122 59.15966 59.72495 60.29510 
60.82212 61.37181 61.98893 62.67675 63.39541 64.13998 64.88845 65.61016 
66.33941 67.04371 67.75523 68.43574 69.04622 69.59608 70.06845 70.47490 
70.83816 71.13984 71.42894 71.70917 71.96859 3.334197 4.910905 14.29977 
23.27399 23.94233 23.17331
A03 17.10935 18.47541 26.20270 29.63260 29.63260 29.63260 29.63260 29.63260 
29.63260 29.63260 29.64588 29.65157 29.63612 29.58597 29.57378 29.67228 
29.70433 30.12689 30.73129 31.32724 31.91399 32.48873 32.99629 33.37160 
33.59344 33.67405 33.61911 33.47831 33.29254 33.08185 32.75014 32.37696 
31.94153 31.37080 30.73494 29.96604 29.15751 28.32563 27.54566 26.80841 
26.09175 25.38836 24.68756 23.95414 23.16542 22.37761 21.63206 20.97823 
20.45338 20.05157 19.73250 19.46748 19.23036 18.97733 18.65564 18.23673 
17.73358 17.18844 16.66834 16.21723 15.84922 15.55083 15.31516 15.15581 
15.08681 15.07799 15.09597 15.09841 15.04967 14.93787 14.76898 14.56629 
14.35083 14.13002 13.91975 13.73163 13.57744 13.47193 13.44408 13.48591 
13.58107 13.75030 14.00057 14.30415 14.65372 15.04105 15.45463 15.86063 
16.19890 16.40185 16.49703 16.50219 16.41853 16.31157 16.19956 16.05594 
15.85916 15.62991 15.37897 15.11620 14.82466 14.60134 14.48810 14.51885 
14.61852 14.85168 15.21316 15.75320 16.44775 8.399067 5.260953 4.609897 
13.62401 6.492907 5.963199
A04 11.03310 13.31486 5.280293 5.168545 5.168545 5.168545 5.168545 5.168545 
5.168545 5.168545 5.167730 5.165504 5.159511 5.147398 5.141805 5.155351 
5.152217 5.162488 5.194414 5.223018 5.245787 5.276193 5.319488 5.374360 
5.439537 5.521756 5.640395 5.821725 6.084098 6.426830 6.799501 7.224504 
7.686358 8.092458 8.415244 8.635094 8.789741 8.872145 8.984561 9.144123 
9.379131 9.735168 10.26639 11.00824 11.98843 13.17518 14.47492 15.71983 
16.73760 17.40338 17.70745 17.70986 17.49770 17.14010 16.68365 16.15918 
15.60069 15.04002 14.51496 14.03743 13.60872 13.24389 12.92833 12.65891 
12.42301 12.20434 11.98673 11.75301 11.50296 11.25029 11.01352 10.80690 
10.64309 10.53008 10.46800 10.45208 10.48062 10.54113 10.62757 10.72822 
10.82236 10.90642 10.97942 11.03239 11.08496 11.13448 11.19004 11.24915 
11.30822 11.35758 11.37504 11.37368 11.33923 11.28292 11.26128 11.24059 
11.22360 11.22819 11.27743 11.34726 11.43106 11.53322 11.63346 11.70259 
11.76355 11.78773 11.81129 11.86587 12.05006 1.423363 1.776467 1.929548 
4.427489 4.067722 4.505862
A05 24.70981 23.16614 33.54472 41.11073 41.11073 41.11073 41.11073 41.11073 
41.11073 41.11073 41.13005 41.13887 41.11839 41.04978 41.03386 41.17150 
40.95643 41.18966 41.67439 42.06728 42.33950 42.57297 42.76402 42.85671 
42.83316 42.71726 42.49756 42.16680 41.82280 41.43708 40.86708 40.17131 
39.35567 38.45290 37.60611 36.82216 36.10802 35.46307 34.83066 34.09790 
33.17152 32.01431 30.67445 29.22690 27.72902 26.34734 25.26509 24.55539 
24.19077 24.06560 23.99357 23.81423 23.42002 22.75628 21.81970 20.65605 
19.36501 18.05389 16.81617 15.73331 14.85771 14.22687 13.89908 13.89173 
14.18397 14.72005 15.43744 16.32235 17.41598 18.76141 20.39076 22.23923 
24.12141 25.83630 27.26749 28.43298 29.46076 30.49457 31.65472 32.99463 
34.47447 36.05419 37.70614 39.38588 41.02314 42.53518 43.85131 44.88708 
45.55654 45.81592 45.73674 45.40776 44.92561 44.39591 43.93676 43.55645 
43.35451 43.39218 43.65420 44.12402 44.75203 45.50467 46.34162 47.20973 
48.10778 48.99039 49.87789 50.84677 51.95847 2.024872 1.976043 1.449607 inf


The chart-raw.tiff was created using this command (dcraw is 9.28 from homebrew):

dcraw -v -T -o 0 -j -M -6 -W -g 1 1 -w -c _DSC0394.NEF > chart-raw.tiff

What could be relevant is the fact I measured a Color Checker Classic manually 
using iStudio (Colormunki) device. I'm not sure whether I got the layout right, 
but I started with the Dark Skin patch, considering it A1, moved horizontally 
to Bluish green (A6) and then similarly through each subsequent row with the 
grayscale being the last one. I measured patch by patch, here is the command:

chartread -v -H -p CC24Classic

Then I generated the reference file:

spec2cie -v -i D50 CC24Classic.ti3 D50-reference.cie

At this point the issue with scanin occurs. Please comment whether I'm doing 
something wrong.

The files are available at 
https://drive.google.com/file/d/1YSha9f5FdSNWqT8fg0Hc4ZIv-rvWG5Kv/view?usp=sharing
 
<https://drive.google.com/file/d/1YSha9f5FdSNWqT8fg0Hc4ZIv-rvWG5Kv/view?usp=sharing>
 (214Mb).

Best Regards,
Nic Nilov.

Other related posts: