[argyllcms] Conversion of spectral file to .cie

  • From: "Tomas Sobek" <sankalpo@xxxxxxxxx>
  • To: <argyllcms@xxxxxxxxxxxxx>
  • Date: Fri, 14 Oct 2016 10:06:45 +0200 (CEST)

Hi,
I am new to colour management and on a steep learning curve. I am trying to 
convert spectral reference file that came with ColorChecker Passport to .cie 
file I could use with scanin. My motivation is that there are supposedly 
slightly different variations of the target and I thought if I use data that 
came with my one I will get hopefully close to reality.

So far I managed to put together a manual procedure, see draft at 
https://tomassobekphotography.co.nz/articles/create-CIE-file-from-spectral-ColorChecker-Passport.php

While I am not sure the above procedure is correct, I wanted to calculate the 
values using alternative way and cross-check them. I found that Argyll CMS 
includes tools that look like the right tools, as per 
http://www.argyllcms.com/doc/Scenarios.html

     txt2ti3 ColorCheckerSG.txt ColorCheckerSG
     spec2cie ColorCheckerSG.ti3 ColorCheckerSG.cie

But I failed miserably. My spectral file includes 24 rows of numbers, 36 
numbers in each row. And my result was:
txt2ti3: Error - No patches

I haven't managed to decode enough information from man/info/internet about 
txt2ti3 to make it work. And I am not good at reading code in C either. But I 
thought: Hey, all it does is convert my file into TI3 format. And that is 
documented in http://argyllcms.com/doc/ti3_format.html

Comparing various sources I guessed some stuff and I ended up with a TI3 file I 
tried to load first into spec2cie:
argyll: Error - Input file doesn't contain field RGB_R

I even tried loading it into txt2ti3, out of curiosity:
txt2ti3: Error - Input file 'ColorChecker24_spectral.ti3' doesn't contain field 
XYZ_X or spectral

I have attached my spectral file as well as manually created TI3 file for 
reference. If anyone could help me, that would be much appreciated:
a) Validate my manual procedure as per the URL above.
b) Show me how to use txt2ti3 and/or spec2cie to achieve the same result.

Cheers, Tomas
CTI3

DEVICE_CLASS "INPUT"
INSTRUMENT_TYPE_SPECTRAL "YES"
COLOR_REP "XYZ_RGB"

SPECTRAL_BANDS "36"
SPECTRAL_START_NM "380.0"
SPECTRAL_END_NM "730.0"

NUMBER_OF_FIELDS 37
BEGIN_DATA_FORMAT
SAMPLE_ID SPEC_380 SPEC_390 SPEC_400 SPEC_410 SPEC_420 SPEC_430 SPEC_440 
SPEC_450 SPEC_460 SPEC_470 SPEC_480 SPEC_490 SPEC_500 SPEC_510 SPEC_520 
SPEC_530 SPEC_540 SPEC_550 SPEC_560 SPEC_570 SPEC_580 SPEC_590 SPEC_600 
SPEC_610 SPEC_620 SPEC_630 SPEC_640 SPEC_650 SPEC_660 SPEC_670 SPEC_680 
SPEC_690 SPEC_700 SPEC_710 SPEC_720 SPEC_730
END_DATA_FORMAT

NUMBER_OF_SETS 24
BEGIN_DATA
A1      0.0546  0.0582  0.0602  0.0605  0.06    0.06    0.0604  0.0604  0.0604  
0.0605  0.0608  0.0615  0.0634  0.0695  0.0763  0.0792  0.0804  0.0826  0.088   
0.0997  0.1164  0.1335  0.1436  0.1478  0.1517  0.1592  0.1699  0.1809  0.1894  
0.1907  0.1854  0.18    0.1808  0.1875  0.1974  0.212
B1      0.0496  0.0501  0.0504  0.0513  0.0512  0.0514  0.052   0.0525  0.0533  
0.0538  0.0554  0.058   0.0651  0.0872  0.1242  0.1525  0.1694  0.1908  0.2357  
0.316   0.4185  0.5141  0.567   0.5764  0.569   0.5578  0.5476  0.5365  0.5265  
0.52    0.52    0.5276  0.5428  0.5612  0.5754  0.5884
C1      0.058   0.0756  0.1039  0.1486  0.1922  0.2357  0.2895  0.3418  0.3555  
0.3202  0.2521  0.1777  0.1178  0.0784  0.0579  0.0485  0.0442  0.0424  0.0412  
0.041   0.0408  0.0409  0.0408  0.0411  0.0414  0.0419  0.0422  0.0424  0.0427  
0.0428  0.0431  0.044   0.0452  0.0474  0.0504  0.0561
D1      0.1249  0.2093  0.3975  0.6434  0.7927  0.84    0.8551  0.8642  0.8732  
0.878   0.8819  0.8858  0.8875  0.8897  0.893   0.8936  0.8971  0.9013  0.9021  
0.9075  0.9091  0.9135  0.9164  0.9181  0.9198  0.9197  0.924   0.9286  0.9322  
0.9313  0.9317  0.9339  0.9367  0.9401  0.941   0.9432
A2      0.1077  0.1556  0.2103  0.2363  0.2375  0.236   0.2351  0.2352  0.2368  
0.2399  0.2506  0.2725  0.2948  0.3063  0.3061  0.3028  0.3013  0.3001  0.3002  
0.317   0.3755  0.4523  0.4923  0.5036  0.5126  0.5277  0.5498  0.57    0.5823  
0.5786  0.5624  0.5481  0.5464  0.5562  0.5702  0.5917
B2      0.1017  0.156   0.2326  0.2908  0.323   0.3507  0.3779  0.3927  0.3856  
0.3558  0.3096  0.2554  0.2066  0.1672  0.1384  0.1183  0.1057  0.0977  0.0912  
0.0872  0.0852  0.0848  0.0843  0.0838  0.0832  0.084   0.0872  0.0923  0.0998  
0.1096  0.1241  0.1443  0.1721  0.2097  0.2557  0.3093
C2      0.0482  0.0512  0.0523  0.0524  0.0537  0.0549  0.057   0.061   0.0692  
0.0836  0.1087  0.1493  0.2116  0.2911  0.338   0.3363  0.3182  0.2928  0.2574  
0.224   0.1945  0.1655  0.1357  0.1117  0.0966  0.0878  0.0822  0.078   0.0753  
0.0738  0.074   0.0755  0.0783  0.0818  0.0839  0.0859
D2      0.1205  0.2013  0.3571  0.5091  0.5674  0.5801  0.585   0.587   0.5879  
0.586   0.5839  0.5835  0.5829  0.5833  0.5855  0.5856  0.5865  0.5869  0.5861  
0.5892  0.589   0.5897  0.5886  0.5869  0.5853  0.582   0.5805  0.5795  0.5786  
0.5755  0.5725  0.57    0.5685  0.5695  0.5697  0.5702
A3      0.1046  0.1633  0.2459  0.298   0.3109  0.3177  0.3264  0.3322  0.3302  
0.32    0.3077  0.2956  0.279   0.2557  0.2327  0.2158  0.2     0.1787  0.156   
0.144   0.1493  0.1569  0.1531  0.1458  0.1416  0.1396  0.1395  0.1432  0.149   
0.1511  0.1472  0.1409  0.1326  0.1276  0.1302  0.1452
B3      0.0845  0.1114  0.1338  0.1409  0.1398  0.1383  0.1375  0.1361  0.1335  
0.1287  0.1228  0.1172  0.1116  0.1053  0.1002  0.098   0.0977  0.0976  0.0988  
0.1102  0.1612  0.2752  0.41    0.5087  0.5573  0.574   0.5787  0.5801  0.5874  
0.6026  0.6233  0.6446  0.6609  0.6691  0.6674  0.6706
C3      0.0483  0.0497  0.0488  0.0476  0.0469  0.0465  0.0464  0.0465  0.0463  
0.0456  0.0449  0.0443  0.0435  0.0433  0.0435  0.0436  0.0442  0.0453  0.0477  
0.0531  0.0643  0.0903  0.1544  0.2854  0.4498  0.578   0.6515  0.6879  0.7078  
0.7191  0.7273  0.7346  0.7415  0.7482  0.7528  0.758
D3      0.1168  0.1795  0.271   0.3309  0.3468  0.3519  0.3554  0.3573  0.3565  
0.3538  0.3512  0.35    0.3494  0.3498  0.3512  0.3514  0.3514  0.3514  0.3512  
0.3536  0.3548  0.3557  0.3548  0.3531  0.3509  0.3477  0.3456  0.3432  0.3411  
0.3386  0.3358  0.3332  0.3313  0.3297  0.3272  0.3259
A4      0.0503  0.0514  0.0528  0.0546  0.0563  0.0584  0.0608  0.0625  0.0638  
0.0646  0.0661  0.0688  0.0763  0.0998  0.1406  0.1739  0.1838  0.1726  0.1519  
0.1345  0.1236  0.1173  0.1116  0.1069  0.1052  0.1066  0.1098  0.1115  0.1125  
0.111   0.1076  0.1048  0.1054  0.108   0.1117  0.1175
B4      0.0854  0.1223  0.1641  0.1905  0.1956  0.1845  0.1646  0.1416  0.1195  
0.0995  0.0843  0.0726  0.0638  0.0584  0.0549  0.0522  0.0509  0.0514  0.0525  
0.0533  0.0533  0.0541  0.059   0.0715  0.0907  0.1113  0.1301  0.1485  0.1702  
0.1965  0.2295  0.2705  0.3157  0.3626  0.4128  0.4736
C4      0.0503  0.054   0.0543  0.0546  0.0548  0.0559  0.0583  0.0624  0.0699  
0.0832  0.1052  0.1406  0.1988  0.2974  0.425   0.5302  0.5942  0.6292  0.6519  
0.6737  0.6875  0.6982  0.7032  0.7045  0.7053  0.7046  0.7062  0.707   0.7093  
0.7117  0.7166  0.7237  0.7333  0.7434  0.7504  0.7579
D4      0.0944  0.1278  0.1639  0.1826  0.1876  0.1903  0.1937  0.1954  0.1956  
0.1942  0.1928  0.1925  0.1922  0.1931  0.1943  0.1947  0.1951  0.1951  0.1944  
0.1951  0.1952  0.195   0.1938  0.1922  0.1904  0.1884  0.1867  0.1852  0.1835  
0.1812  0.1793  0.1769  0.1756  0.175   0.1742  0.1743
A5      0.1093  0.179   0.2896  0.374   0.4042  0.4148  0.4216  0.4246  0.4212  
0.4078  0.3842  0.3497  0.3116  0.2784  0.2503  0.2256  0.2126  0.208   0.2014  
0.1963  0.1964  0.2052  0.2206  0.2347  0.2423  0.2518  0.2751  0.3076  0.3389  
0.3553  0.3544  0.3479  0.348   0.3558  0.3681  0.3876
B5      0.0587  0.0622  0.0643  0.0652  0.0657  0.0673  0.0706  0.0752  0.0845  
0.1006  0.128   0.1725  0.2432  0.3475  0.4501  0.5102  0.531   0.5273  0.5095  
0.4862  0.453   0.413   0.3702  0.3367  0.3179  0.3073  0.301   0.297   0.2998  
0.3104  0.326   0.3423  0.3552  0.3614  0.3593  0.361
C5      0.1121  0.1769  0.2772  0.3438  0.3583  0.3494  0.3292  0.302   0.2731  
0.2435  0.2134  0.1844  0.162   0.1433  0.1223  0.1041  0.0983  0.1016  0.1026  
0.1083  0.1353  0.1936  0.276   0.379   0.4948  0.6008  0.6832  0.7387  0.7761  
0.798   0.8105  0.8191  0.8264  0.8323  0.8377  0.8479
D5      0.0619  0.0731  0.081   0.0855  0.0869  0.0879  0.0894  0.0898  0.0896  
0.0891  0.0881  0.088   0.0882  0.0884  0.0889  0.0891  0.0892  0.089   0.0886  
0.0887  0.0885  0.0881  0.0877  0.0871  0.0864  0.0857  0.0853  0.0845  0.0841  
0.0837  0.0833  0.0823  0.0817  0.0812  0.0809  0.0812
A6      0.1022  0.1572  0.2338  0.2869  0.3076  0.3225  0.3399  0.363   0.3992  
0.4439  0.4883  0.5263  0.5503  0.5603  0.5564  0.5391  0.512   0.475   0.4312  
0.3874  0.3396  0.2911  0.247   0.2159  0.1992  0.1902  0.1845  0.181   0.1824  
0.1894  0.2003  0.2118  0.2209  0.2235  0.2198  0.2194
B6      0.0605  0.0661  0.0686  0.0686  0.0678  0.068   0.0683  0.0689  0.0705  
0.0718  0.0748  0.0801  0.0924  0.1324  0.2114  0.2907  0.3433  0.3846  0.4402  
0.5195  0.5953  0.6444  0.6535  0.633   0.6052  0.5828  0.5705  0.5612  0.5544  
0.5529  0.5579  0.5699  0.5891  0.6103  0.6242  0.6358
C6      0.0842  0.1244  0.1796  0.2223  0.2438  0.2666  0.2977  0.3333  0.3727  
0.4119  0.4344  0.4343  0.4116  0.3715  0.3217  0.2687  0.2186  0.1733  0.1352  
0.1093  0.0934  0.0838  0.0766  0.0718  0.0697  0.0685  0.0688  0.0698  0.0714  
0.0726  0.0725  0.0714  0.0695  0.0688  0.0714  0.0775
D6      0.0342  0.0342  0.0347  0.0348  0.035   0.034   0.0341  0.0342  0.0344  
0.0343  0.0341  0.0336  0.0335  0.0335  0.0334  0.0334  0.0334  0.0332  0.0331  
0.0331  0.033   0.033   0.0329  0.0329  0.0334  0.0332  0.033   0.0331  0.0336  
0.0337  0.0335  0.0338  0.0336  0.0337  0.0338  0.0335
END_DATA
0.0546  0.0582  0.0602  0.0605  0.06    0.06    0.0604  0.0604  0.0604  0.0605  
0.0608  0.0615  0.0634  0.0695  0.0763  0.0792  0.0804  0.0826  0.088   0.0997  
0.1164  0.1335  0.1436  0.1478  0.1517  0.1592  0.1699  0.1809  0.1894  0.1907  
0.1854  0.18    0.1808  0.1875  0.1974  0.212
0.0496  0.0501  0.0504  0.0513  0.0512  0.0514  0.052   0.0525  0.0533  0.0538  
0.0554  0.058   0.0651  0.0872  0.1242  0.1525  0.1694  0.1908  0.2357  0.316   
0.4185  0.5141  0.567   0.5764  0.569   0.5578  0.5476  0.5365  0.5265  0.52    
0.52    0.5276  0.5428  0.5612  0.5754  0.5884
0.058   0.0756  0.1039  0.1486  0.1922  0.2357  0.2895  0.3418  0.3555  0.3202  
0.2521  0.1777  0.1178  0.0784  0.0579  0.0485  0.0442  0.0424  0.0412  0.041   
0.0408  0.0409  0.0408  0.0411  0.0414  0.0419  0.0422  0.0424  0.0427  0.0428  
0.0431  0.044   0.0452  0.0474  0.0504  0.0561
0.1249  0.2093  0.3975  0.6434  0.7927  0.84    0.8551  0.8642  0.8732  0.878   
0.8819  0.8858  0.8875  0.8897  0.893   0.8936  0.8971  0.9013  0.9021  0.9075  
0.9091  0.9135  0.9164  0.9181  0.9198  0.9197  0.924   0.9286  0.9322  0.9313  
0.9317  0.9339  0.9367  0.9401  0.941   0.9432
0.1077  0.1556  0.2103  0.2363  0.2375  0.236   0.2351  0.2352  0.2368  0.2399  
0.2506  0.2725  0.2948  0.3063  0.3061  0.3028  0.3013  0.3001  0.3002  0.317   
0.3755  0.4523  0.4923  0.5036  0.5126  0.5277  0.5498  0.57    0.5823  0.5786  
0.5624  0.5481  0.5464  0.5562  0.5702  0.5917
0.1017  0.156   0.2326  0.2908  0.323   0.3507  0.3779  0.3927  0.3856  0.3558  
0.3096  0.2554  0.2066  0.1672  0.1384  0.1183  0.1057  0.0977  0.0912  0.0872  
0.0852  0.0848  0.0843  0.0838  0.0832  0.084   0.0872  0.0923  0.0998  0.1096  
0.1241  0.1443  0.1721  0.2097  0.2557  0.3093
0.0482  0.0512  0.0523  0.0524  0.0537  0.0549  0.057   0.061   0.0692  0.0836  
0.1087  0.1493  0.2116  0.2911  0.338   0.3363  0.3182  0.2928  0.2574  0.224   
0.1945  0.1655  0.1357  0.1117  0.0966  0.0878  0.0822  0.078   0.0753  0.0738  
0.074   0.0755  0.0783  0.0818  0.0839  0.0859
0.1205  0.2013  0.3571  0.5091  0.5674  0.5801  0.585   0.587   0.5879  0.586   
0.5839  0.5835  0.5829  0.5833  0.5855  0.5856  0.5865  0.5869  0.5861  0.5892  
0.589   0.5897  0.5886  0.5869  0.5853  0.582   0.5805  0.5795  0.5786  0.5755  
0.5725  0.57    0.5685  0.5695  0.5697  0.5702
0.1046  0.1633  0.2459  0.298   0.3109  0.3177  0.3264  0.3322  0.3302  0.32    
0.3077  0.2956  0.279   0.2557  0.2327  0.2158  0.2     0.1787  0.156   0.144   
0.1493  0.1569  0.1531  0.1458  0.1416  0.1396  0.1395  0.1432  0.149   0.1511  
0.1472  0.1409  0.1326  0.1276  0.1302  0.1452
0.0845  0.1114  0.1338  0.1409  0.1398  0.1383  0.1375  0.1361  0.1335  0.1287  
0.1228  0.1172  0.1116  0.1053  0.1002  0.098   0.0977  0.0976  0.0988  0.1102  
0.1612  0.2752  0.41    0.5087  0.5573  0.574   0.5787  0.5801  0.5874  0.6026  
0.6233  0.6446  0.6609  0.6691  0.6674  0.6706
0.0483  0.0497  0.0488  0.0476  0.0469  0.0465  0.0464  0.0465  0.0463  0.0456  
0.0449  0.0443  0.0435  0.0433  0.0435  0.0436  0.0442  0.0453  0.0477  0.0531  
0.0643  0.0903  0.1544  0.2854  0.4498  0.578   0.6515  0.6879  0.7078  0.7191  
0.7273  0.7346  0.7415  0.7482  0.7528  0.758
0.1168  0.1795  0.271   0.3309  0.3468  0.3519  0.3554  0.3573  0.3565  0.3538  
0.3512  0.35    0.3494  0.3498  0.3512  0.3514  0.3514  0.3514  0.3512  0.3536  
0.3548  0.3557  0.3548  0.3531  0.3509  0.3477  0.3456  0.3432  0.3411  0.3386  
0.3358  0.3332  0.3313  0.3297  0.3272  0.3259
0.0503  0.0514  0.0528  0.0546  0.0563  0.0584  0.0608  0.0625  0.0638  0.0646  
0.0661  0.0688  0.0763  0.0998  0.1406  0.1739  0.1838  0.1726  0.1519  0.1345  
0.1236  0.1173  0.1116  0.1069  0.1052  0.1066  0.1098  0.1115  0.1125  0.111   
0.1076  0.1048  0.1054  0.108   0.1117  0.1175
0.0854  0.1223  0.1641  0.1905  0.1956  0.1845  0.1646  0.1416  0.1195  0.0995  
0.0843  0.0726  0.0638  0.0584  0.0549  0.0522  0.0509  0.0514  0.0525  0.0533  
0.0533  0.0541  0.059   0.0715  0.0907  0.1113  0.1301  0.1485  0.1702  0.1965  
0.2295  0.2705  0.3157  0.3626  0.4128  0.4736
0.0503  0.054   0.0543  0.0546  0.0548  0.0559  0.0583  0.0624  0.0699  0.0832  
0.1052  0.1406  0.1988  0.2974  0.425   0.5302  0.5942  0.6292  0.6519  0.6737  
0.6875  0.6982  0.7032  0.7045  0.7053  0.7046  0.7062  0.707   0.7093  0.7117  
0.7166  0.7237  0.7333  0.7434  0.7504  0.7579
0.0944  0.1278  0.1639  0.1826  0.1876  0.1903  0.1937  0.1954  0.1956  0.1942  
0.1928  0.1925  0.1922  0.1931  0.1943  0.1947  0.1951  0.1951  0.1944  0.1951  
0.1952  0.195   0.1938  0.1922  0.1904  0.1884  0.1867  0.1852  0.1835  0.1812  
0.1793  0.1769  0.1756  0.175   0.1742  0.1743
0.1093  0.179   0.2896  0.374   0.4042  0.4148  0.4216  0.4246  0.4212  0.4078  
0.3842  0.3497  0.3116  0.2784  0.2503  0.2256  0.2126  0.208   0.2014  0.1963  
0.1964  0.2052  0.2206  0.2347  0.2423  0.2518  0.2751  0.3076  0.3389  0.3553  
0.3544  0.3479  0.348   0.3558  0.3681  0.3876
0.0587  0.0622  0.0643  0.0652  0.0657  0.0673  0.0706  0.0752  0.0845  0.1006  
0.128   0.1725  0.2432  0.3475  0.4501  0.5102  0.531   0.5273  0.5095  0.4862  
0.453   0.413   0.3702  0.3367  0.3179  0.3073  0.301   0.297   0.2998  0.3104  
0.326   0.3423  0.3552  0.3614  0.3593  0.361
0.1121  0.1769  0.2772  0.3438  0.3583  0.3494  0.3292  0.302   0.2731  0.2435  
0.2134  0.1844  0.162   0.1433  0.1223  0.1041  0.0983  0.1016  0.1026  0.1083  
0.1353  0.1936  0.276   0.379   0.4948  0.6008  0.6832  0.7387  0.7761  0.798   
0.8105  0.8191  0.8264  0.8323  0.8377  0.8479
0.0619  0.0731  0.081   0.0855  0.0869  0.0879  0.0894  0.0898  0.0896  0.0891  
0.0881  0.088   0.0882  0.0884  0.0889  0.0891  0.0892  0.089   0.0886  0.0887  
0.0885  0.0881  0.0877  0.0871  0.0864  0.0857  0.0853  0.0845  0.0841  0.0837  
0.0833  0.0823  0.0817  0.0812  0.0809  0.0812
0.1022  0.1572  0.2338  0.2869  0.3076  0.3225  0.3399  0.363   0.3992  0.4439  
0.4883  0.5263  0.5503  0.5603  0.5564  0.5391  0.512   0.475   0.4312  0.3874  
0.3396  0.2911  0.247   0.2159  0.1992  0.1902  0.1845  0.181   0.1824  0.1894  
0.2003  0.2118  0.2209  0.2235  0.2198  0.2194
0.0605  0.0661  0.0686  0.0686  0.0678  0.068   0.0683  0.0689  0.0705  0.0718  
0.0748  0.0801  0.0924  0.1324  0.2114  0.2907  0.3433  0.3846  0.4402  0.5195  
0.5953  0.6444  0.6535  0.633   0.6052  0.5828  0.5705  0.5612  0.5544  0.5529  
0.5579  0.5699  0.5891  0.6103  0.6242  0.6358
0.0842  0.1244  0.1796  0.2223  0.2438  0.2666  0.2977  0.3333  0.3727  0.4119  
0.4344  0.4343  0.4116  0.3715  0.3217  0.2687  0.2186  0.1733  0.1352  0.1093  
0.0934  0.0838  0.0766  0.0718  0.0697  0.0685  0.0688  0.0698  0.0714  0.0726  
0.0725  0.0714  0.0695  0.0688  0.0714  0.0775
0.0342  0.0342  0.0347  0.0348  0.035   0.034   0.0341  0.0342  0.0344  0.0343  
0.0341  0.0336  0.0335  0.0335  0.0334  0.0334  0.0334  0.0332  0.0331  0.0331  
0.033   0.033   0.0329  0.0329  0.0334  0.0332  0.033   0.0331  0.0336  0.0337  
0.0335  0.0338  0.0336  0.0337  0.0338  0.0335

Other related posts: