Did try it with more patches (although not this example) and that does decrease the dE significantly although calculation time does go up.
A quick remark: If you use a build of
darktable-chart that has commit
e876ef3ba77aec87ee2bc716bb86b21b2137f957 (i.e., anything older than this post) then you no longer need to edit the CSV file manually. Instead you can just click on the “export” button in the gui tool.
Will update the description, thanks!
Thanks for the tutorial @dutch_wolf!
So I made a script (and some patches to
darktable-chart) to automatically convert HaldCLUTs to dtstyles using the technique in the video. Repo here.
- You need to build the patched
darktable-chartisn’t very programmable at the moment, so I had to patch it so that it can accept all processing parameters from the command line.
- The script is in
tools/haldclut2dtstyle/haldclut2dtstyle.sh. Basically, you give it a valid HaldCLUT in PNG and it will output an
.dtstylewith the same name:
- You can optionally specify the number of boxes in the chart (
--chartsize), which can be either 4 or 5 (meaning 4^6 or 5^6 boxes respectively). 4 (default) is the same as @dutch_wolf’s video, but it gives rather large dE (usually 2~4) on @patdavid’s film emulation pack.
- You can try to use 5 if accuracy is important to you, but it is really slow (>10 minutes on an i7-2600, you’ve been warned) as it needs to match ((5^3)^2+32 = 15657) patches. The good news is that it only uses a single core, so it should be trivial to parallelize on a per-file basis.
- You can also optionally specify the number of final patches in the output (
--num_patches), defaults to 49.
I’m converting @patdavid’s film emulation pack in the background at the moment, which will take a while. I will let you know when it is done.
This sounds pretty awesome! I’m excited to try it out.
So, here are the converted dtstyles: https://drive.google.com/open?id=0B7S3WtYAN5gjdFhRMWc2c0xoVk0
Here is a quick snapshot comparison with my haldclut module (left) and the color checker lut output (right), using Kodak Portra 160 emulation:
With the original haldclut:
With converted color checker lut:
The converted color checker lut seems to have a yellowish tint while also having a bit less contrast (dE=2.47971), so I guess there is still some room for improvement.
Let me know if you find this useful.
[PlayRaw] Dornbusch Lighthouse -- A Film Emulation Challenge
Oh, I started work on something similar already. I’ll let you know how well my approach will work when done.
Nice results looks pretty close, note that the difference might also be explained due to the fact that the modules are not in the same place in the pipeline. I mention this since the dE is only ~2.5 if that is max dE it should be very hard to tell any difference in real life pictures I think (a dE of 2 is a Just Noticeable Difference aka JND)
Anyway if this continue like this my tutorial/howto will soon be outdated (in a good way since it all becomes much easier)
@dutch_wolf I am interested in using the HaldCLUT with darktable that I used with RawTherapee. I followed your video (thanks for sharing), I saw your script auto, but I can not compile it, I’m looking for the file hald_clut_4_with_gradient.pgm and .cht?
Or, can I find them?
Thank you very much.
Hi I didn’t make the script that is something @pkmx did for the cht and pgm files (although not sure if you need that particular one) those can be found here https://www.dropbox.com/s/ezlgx9g39bd4gme/dt_chart_experiment_results.tar.gz?dl=0
Thanks for the files, it will advance my work.
Thanks again for the link to the files. I am able to work with testig_new exported in .pfm, I can load the .cht into dartable-chart.
I tried with a movie file and when I want to apply the file hald_clut_4_with_gradient.cht, I have: error parsing CHT file, (parse_cht: 364)
Not sure what you are trying to do there but the cht files is only for use with darktable-chart. If loading the file in darktable-chart gives errors I need to investigate what goes wrong.
EDIT: Okay indeed something goes wrong in both the release and git version of darktable-chart, although seems to be different things (release just gives the error, git version takes ages to load the cht file)
EDIT2: after some debugging and testing I have a new cht file that should work (remove the .txt extension .cht files are text files but only allowed to upload here with txt extension)hald_clut_4_with_gradient_v2.cht.txt (152 Bytes)
Thanks for the reply and the file. I try it and I tell you.
The debug script works perfectly. On the other hand, when I convert the .csv file to .dtstyle with darktable-chart and load it into the “style” tab of dartable, it does not load. It seems that there is a problem with with version 2.2.5?
Still thank you for the work done to run the script.
Can you upload the style somewhere?
I followed the tutorial of @dutch_wolf and added the 2 lines HDR00 and HDR01 to the .cvs file:
And then I used the darktable-chart command to get the .dtstyle file:
I just re-tested. The profile DTStyle is well download in “style” of darktable but with a single black patch.
That is no longer needed. Nowadays you can directly export the style from the GUI, the CSV part can be skipped.
After looking at your CSV file I noticed that there are extra
; at the end of the HDR lines. Once I removed those the style wasn’t all 0 any longer.
Edit: The colors are all wrong when using it though.