How to create camera noise profiles for darktable

Thanks a lot @asn for your great how-to!
I used it to get a denoising profile for my drone (DJI Mavic 2) on Ubuntu 20.04. I succeeded, but wanted to share the bumpy ride:

  1. If you want to install the package darktable-tools-noise on Ubuntu 20.04 you are confronted with the following dependency issue:
The following packages have unmet dependencies:
 graphicsmagick-imagemagick-compat : Conflicts: imagemagick but 8:6.9.10.23+dfsg-2.1ubuntu11.1 is installed
                                     Conflicts: imagemagick:i386 but it is not going to be installed
The following actions will resolve these dependencies:

     Remove the following packages:                                                           
1)     imagemagick [8:6.9.10.23+dfsg-2.1ubuntu11.1 (focal-security, focal-updates, now)]      
2)     imagemagick-6.q16 [8:6.9.10.23+dfsg-2.1ubuntu11.1 (focal-security, focal-updates, now)]

This means that we need to remove imagemagick in favor of the forked graphicsmagick which also provides a compatibilty layer for imagemagick.

  1. Once you installed darktable-tools-noise, you need to remove the check if ! convert --version >/dev/null 2>&1; on line 137 within /usr/lib/darktable/tools/subr.sh. This check somehow seems to only succeed using imagemagick but not with graphicsmagick, which is weird, because we were forced to remove imagemagick in favor of graphicsmagick to begin with :smiley:

  2. While running /usr/lib/darktable/tools/darktable-gen-noiseprofile -d $PWD in the denoising image folder the following warnings popped up:

convert convert: Unrecognized channel type (-channel).
/usr/lib/darktable/tools/subr.sh: line 488: [: : integer expression expected
convert convert: Unrecognized channel type (-channel).
/usr/lib/darktable/tools/subr.sh: line 495: [: : integer expression expected

Nevertheless the profiling succeeded and the results with (wavelet-auto) look convincing :+1:
The noise_result.pdf (400.0 KB) looks quite interesting though.
Here is the final presets.json (1.8 KB) file.

Here is an example: DJI_0751-thumb|690x459, 50%.
I also uploaded my RAW files and the generated profile (whole tar.gz file):
https://filebin.net/j6g9z6gic4782zr4

I also created a PR to get the profile into darktable master: Add Hasselblad L1D-20c (a.k.a. DJI Mavic 2) to noiseprofiles by da-phil · Pull Request #7310 · darktable-org/darktable · GitHub