I’ll try and contact the developer. However, the program has a user interface on a PC which looks like this (http://www.dohm.com.au/coca/):
But in doesnt on Linux, which is why I try to do it in Terminal. The program makes ICC profiles.
This might not be helpfull, but I did this:
peter@peter-desktop:~/CoCa_Linux$ python2 CoCa_Linux.py || python3 CoCa_Linux.py
Target Image file name (incl. full path): /home/peter/CoCa_Linux/ScanMate11K Provia cq16bit kopi.tif
Profile information: Device: [Camera]:SM
Profile information: Model: [DSLR]:11K
Profile information: Profile Unique Description: [CoCa]:ScanMate11K Provia cq16bitG22
Profile information: Copyright: [None]:
Choose target type:
1. Xrite ColorChecker 24-patch
2. Xrite ColorChecker SG
3. CMP Checker 24-patch
4. CMP Digital TargeT 003
5. CMP Digital Target-3
6. CMP Digital Target-4
7. HutchColor HCT
8. LaserSoft DCPro
9. QPcard 201
10. QPcard 202
11. IT8.7
Target Type choice: [1]:11
To use generic reference file press Enter, otherwise press "N" [Y]:n
Enter Reference File name (incl. full path): /home/peter/CoCa_Linux/F180316 kopi.txt
Adjust target image for perspective distortion (Y/N): [N]:n
Choose gamma or press ENTER to accept default: [2.2]:2.2
Choose Profile Algorithm:
1. Lab clut
2. XYZ clut
3. Display XYZ clut + Matrix
4. Gamma + Matrix
5. Shaper + Matrix
6. Matrix only
7. Single Gamma + Matrix
8. Single Shaper + Matrix
Algorithm choice: [1]:2
Choose Profile Quality:
1. Low
2. Medium
3. High
Quality choice: [3]:2
Choose White Point (range 0.4 to 1.5) or press ENTER to accept default: [1.0]:
Select Default intent
1. Perceptual
2. Rel. Colorimetric
3. 6Saturation
4. Abs. Colorimetric
Default Intent choice: [1]:1
/bin/sh: 1: /home/peter/CoCa_Linux/scanin.sh: not found
ERROR! "Scanin" process did not succeed. No *.ti3 file found. Aborting
Press any key.
But as far as I can understand from this text from the developer I have to do something more at the end:
import os
import sys
import subprocess
CONST_GAMMA = '2.2'
CONST_WB = '1.0'
CONST_ARG_BIN_PTH = os.path.dirname(os.path.realpath(__file__)) + '/argyll/bin/'
CONST_ARG_REF_PTH = os.path.dirname(os.path.realpath(__file__)) + '/argyll/ref/'
os.system('clear')
script_pth = os.path.dirname(os.path.realpath(__file__)) + '/'
def default_input( message, defaultVal ):
if defaultVal:
return raw_input( "%s [%s]:" % (message,defaultVal) ) or defaultVal
else:
return raw_input( "%s " % (message) )
icc_file = raw_input('Target Image file name (incl. full path): ')
if os.path.isfile(icc_file):
temp_file = os.path.splitext(icc_file)[0]
device_info = default_input('Profile information: Device: ', 'Camera')
model_info = default_input('Profile information: Model: ', 'DSLR')
prof_info = default_input('Profile information: Profile Unique Description: ', 'CoCa')
copyright_info = default_input('Profile information: Copyright: ', 'None')
print
print 'Choose target type:'
print '\t1.\tXrite ColorChecker 24-patch'
print '\t2.\tXrite ColorChecker SG'
print '\t3.\tCMP Checker 24-patch'
print '\t4.\tCMP Digital TargeT 003'
print '\t5.\tCMP Digital Target-3'
print '\t6.\tCMP Digital Target-4'
print '\t7.\tHutchColor HCT'
print '\t8.\tLaserSoft DCPro'
print '\t9.\tQPcard 201'
print '\t10.\tQPcard 202'
print '\t11.\tIT8.7'
target_type = default_input('Target Type choice: ', '1')
tmp = default_input('To use generic reference file press Enter, otherwise press "N"', 'Y')
if tmp.upper() == 'Y':
if target_type == '1':
checker_cie = '"' + CONST_ARG_REF_PTH + 'ColorChecker.cie"'
elif target_type == '3':
checker_cie = '"' + CONST_ARG_REF_PTH + 'ColorChecker.cie"'
elif target_type == '9':
checker_cie = '"' + CONST_ARG_REF_PTH + 'QPcard_201.cie"'
elif target_type == '10':
checker_cie = '"' + CONST_ARG_REF_PTH + 'QPcard_202.cie"'
else:
print
print 'ERROR! Generic Reference File does not exist for selected target.'
checker_cie = '"' + raw_input('Enter Reference File name (incl. full path): ') + '"'
else:
checker_cie = '"' + raw_input('Enter Reference File name (incl. full path): ') + '"'
print
perspective = str.upper(default_input('Adjust target image for perspective distortion (Y/N): ', 'N'))
print
gamma = default_input('Choose gamma or press ENTER to accept default: ', '2.2')
print
algorithm = ['1', '2', '3', '4']
print 'Choose Profile Algorithm:'
print '\t1.\tLab clut'
print '\t2.\tXYZ clut'
print '\t3.\tDisplay XYZ clut + Matrix'
print '\t4.\tGamma + Matrix'
print '\t5.\tShaper + Matrix'
print '\t6.\tMatrix only'
print '\t7.\tSingle Gamma + Matrix'
print '\t8.\tSingle Shaper + Matrix'
algorithm = default_input('Algorithm choice: ', '1')
print
print 'Choose Profile Quality:'
print '\t1.\tLow'
print '\t2.\tMedium'
print '\t3.\tHigh'
quality = default_input('Quality choice: ', '3')
print
wp = default_input('Choose White Point (range 0.4 to 1.5) or press ENTER to accept default: ', '1.0')
print
print 'Select Default intent'
print '\t1.\tPerceptual'
print '\t2.\tRel. Colorimetric'
print '\t3.\t6Saturation'
print '\t4.\tAbs. Colorimetric'
def_intent = default_input('Default Intent choice: ', '1')
if def_intent == '1':
def_intent = ' -Z p'
elif def_intent == '2':
def_intent = ' -Z r'
elif def_intent == '3':
def_intent = ' -Z s'
elif def_intent == '4':
def_intent = ' -Z a'
else:
def_intent = ''
checker = ''
if target_type == '1':
checker = '"' + CONST_ARG_REF_PTH + 'ColorChecker.cht"'
elif target_type == '2':
checker = '"' + CONST_ARG_REF_PTH + 'ColorCheckerSG.cht"'
elif target_type == '3':
checker = '"' + CONST_ARG_REF_PTH + 'ColorChecker.cht"'
elif target_type == '4':
checker = '"' + CONST_ARG_REF_PTH + 'CMP_DT_003.cht"'
elif target_type == '5':
checker = '"' + CONST_ARG_REF_PTH + 'CMP_Digital_Target-3.cht"'
elif target_type == '6':
checker = '"' + CONST_ARG_REF_PTH + 'CMP_Digital_Target-3.cht"'
elif target_type == '7':
checker = '"' + CONST_ARG_REF_PTH + 'Hutchcolor.cht"'
elif target_type == '8':
checker = '"' + CONST_ARG_REF_PTH + 'LaserSoftDCPro.cht"'
elif target_type == '9':
checker = '"' + CONST_ARG_REF_PTH + 'QPcard_201.cht"'
elif target_type == '10':
checker = '"' + CONST_ARG_REF_PTH + 'QPcard_202.cht"'
elif target_type == '11':
checker = '"' + CONST_ARG_REF_PTH + 'it8.cht"'
else:
checker = '"' + CONST_ARG_REF_PTH + 'ColorChecker.cht"'
if quality == '1':
quality = 'l'
elif quality == '2':
quality = 'm'
elif quality == '3':
quality = 'h'
else:
quality = 'h'
if perspective == 'Y':
perspective = ''
else:
perspective = ''
if algorithm == '1':
algorithm = 'l'
elif algorithm == '2':
algorithm = 'x'
elif algorithm == '3':
algorithm = 'X'
elif algorithm == '4':
algorithm = 'g'
elif algorithm == '5':
algorithm = 's'
elif algorithm == '6':
algorithm = 'm'
elif algorithm == '7':
algorithm = 'G'
elif algorithm == '8':
algorithm = 'S'
else:
algorithm = 'l'
if gamma != '2.2':
gamma = '-G '+ gamma + ' '
else:
gamma = ''
if wp != '1.0':
wp = '-U '+ wp + ' '
else:
wp = ''
out_text = '"' + CONST_ARG_BIN_PTH + 'scanin" -v ' + gamma + perspective + '"' + script_pth + icc_file + '" ' + checker + ' ' + checker_cie
outfile = script_pth + 'scanin.sh'
out_file = open(outfile, 'w')
out_file.write('#!/bin/bash')
out_file.write(out_text)
out_file.close()
os.system('chmod +x ' + outfile)
p = subprocess.Popen(outfile, shell=True)
p.wait()
if os.path.isfile(script_pth + temp_file + '.ti3'):
outfile = script_pth + 'colprof.sh'
out_text = CONST_ARG_BIN_PTH + 'colprof -v4 -A' + device_info + ' -M ' + model_info + ' -D' + prof_info + ' -C' + copyright_info +\
def_intent + ' -q' + quality + ' -a' + algorithm + ' ' + '"' + temp_file + '"'
out_file = open(outfile, 'w')
out_file.write(out_text)
out_file.close()
p = subprocess.Popen(outfile, shell=True)
p.wait()
else:
print 'ERROR! "Scanin" process did not succeed. No *.ti3 file found. Aborting'
raw_input('Press any key.')
else:
print 'File NOT found. Aborting.'
raw_input('Press any key.')
if os.path.isfile(script_pth + 'colprof.sh'):
os.remove(script_pth + 'colprof.sh')
if os.path.isfile(script_pth + 'scanin.sh'):
os.remove(script_pth + 'scanin.sh')
tmp = open(script_pth + temp_file + '.ti3', 'w')
tmp.close()
#if os.path.isfile(script_pth + temp_file + '.t3'):
os.remove(script_pth + temp_file + '.ti3')
print ''
print 'Color Profile file has been saved to: "' + script_pth + '"'
raw_input('Press ENTER to exit.')
This might not get me anywhere and thats ok, but Im trying anyway…