Script to automate X-Rite Colorchecker camera calibration
Hi all
I am trying to develop a script that will at least in part automate the process of creating an ICC profile for Capture one using a Colorchecker passport target.
At the moment you have to capture the image, set the image ICC to "No Colour Correction" and "Linear response" and then process this variant as a 16bit Tiff. Then you would open the X-Rite software and import that Tiff and it would export an ICC profile based on that target and make it available as an option in Capture One. Capture one has to be restarted before the profile shows up.
So far I have gotten Capture One to set the ICC profile with a new layer (you have to start with a completely unadjusted image, cropped preferably to just show the target) and then Export it using the applicable process recipe to get the 16bit tiff. Then I have gotten the Xrite software to launch. That's where I'm stuck, the camera calibration software is not scriptable.
Below is what I have so far. What I'm thinking is to get it at least most of the way automated by processing the Tiff, getting Finder to reveal that output folder and then silently quitting Capture one and then launching the Xrite software. That way I will be left with a finder window that I can just drag and drop into Xrite, create profile and then close. Reopen Capture one and voila the new ICC profile will be there.
Is this the best way to go about it?
tell application "Capture One 20 3"
repeat with thisVariant in (get variants whose selected is true)
set theNewLayer to make new layer of thisVariant with properties ¬
{opacity:100, name:"XRITE"}
tell theNewLayer to fill mask
tell theNewLayer to set styles of item 1 of thisVariant to "XRITE"
end repeat
set proc_result to process thisVariant recipe "TIFF - XRITE"
end tell
tell application "ColorChecker Camera Calibration"
launch
end tell
I am trying to develop a script that will at least in part automate the process of creating an ICC profile for Capture one using a Colorchecker passport target.
At the moment you have to capture the image, set the image ICC to "No Colour Correction" and "Linear response" and then process this variant as a 16bit Tiff. Then you would open the X-Rite software and import that Tiff and it would export an ICC profile based on that target and make it available as an option in Capture One. Capture one has to be restarted before the profile shows up.
So far I have gotten Capture One to set the ICC profile with a new layer (you have to start with a completely unadjusted image, cropped preferably to just show the target) and then Export it using the applicable process recipe to get the 16bit tiff. Then I have gotten the Xrite software to launch. That's where I'm stuck, the camera calibration software is not scriptable.
Below is what I have so far. What I'm thinking is to get it at least most of the way automated by processing the Tiff, getting Finder to reveal that output folder and then silently quitting Capture one and then launching the Xrite software. That way I will be left with a finder window that I can just drag and drop into Xrite, create profile and then close. Reopen Capture one and voila the new ICC profile will be there.
Is this the best way to go about it?
tell application "Capture One 20 3"
repeat with thisVariant in (get variants whose selected is true)
set theNewLayer to make new layer of thisVariant with properties ¬
{opacity:100, name:"XRITE"}
tell theNewLayer to fill mask
tell theNewLayer to set styles of item 1 of thisVariant to "XRITE"
end repeat
set proc_result to process thisVariant recipe "TIFF - XRITE"
end tell
tell application "ColorChecker Camera Calibration"
launch
end tell
2
-
Update:
I've gotten it to work! It's not perfect since the Xrite software isn't scriptable but it still saves time over the long run.
Steps:
I reset the variant
Pick white balance
Crop to the target
Run Script below that:
>sets the colour profile of the variant to "no colour effect" and "linear response" via an applied style on a new layer
>processes the Tiff needed
>it will close Capture application since it needs to be restarted anyway for a profile to show up
>It will open the resulting tiff in finder (using the process recipe since I couldn't find a way to script this, even though I'm sure it exists)
> it will open the Xrite software
From there I drag the tiff and save the ICC profile and then reopen Capture.
It would be better if it was integrated but this still saves me a lot of time and repetitive clicks. Would anyone else find this useful?
tell application "Capture One 20"
repeat with thisVariant in (get variants whose selected is true)
set theNewLayer to make new layer of thisVariant with properties ¬
{opacity:100, name:"XRITE"}
tell theNewLayer to fill mask
tell theNewLayer to set styles of item 1 of thisVariant to "XRITE"
end repeat
set proc_result to process thisVariant recipe "TIFF - XRITE"
delay 5
silently quit
end tell
tell application "ColorChecker Camera Calibration"
launch
end tell2
Post is closed for comments.
Comments
1 comment