Improving and “installing” denoise profiles in darktable

This article desribes how to postprocess and install denoise profiles that have been manually created for darktable. By “installing”, I mean to make the denoise profile available in the productive darktable library, which is usually located at ~/.config/darktable/library.db .

Obtaining a denoise profile

There is already a very good tutorial and excellent tool support for determining a camera’s noise profile. The profiling produces two major artefacts:

  • presets.txt contains one or more array items that can used while compiling darktable
  • library.db an SQLite library that may be used to evaluate the new denoise profiles on the fly by running darktable as follows:

     

I will now describe how to optimize and export the denoise profiles from the SQLite library.

For visual inspection, I recommend the Firefox addin SQLite Manager. For batch processing, I use the command line tool sqlite3, which can be installed as follows:

The generated denoise profiles can be found with the following SQL query:

You recognize the camera that you just built the denoise profiles for in the name column. In this article, I use the Canon EOS 100D as a running example:

Postprocessing (optional)

Looking  at the further columns, you will notice filter criteria such as model, maker, lens, exposure_{min,max}, aperture_{min,max},focal_length_{min,max}. The column filter determines whether (=1) or not (=0) each row is only displayed in darktable only if the current image matches the filter criteria.

The following SQL code adjusts the filter criteria for each denoise profile for the Canon EOS 100D separately. The values for model and maker have been extracted from the image information as shown in darktable.

If this SQL code is stored in the file postprocessing.sql, the following Bash code can be used to perform the postprocessing:

Afterwards, you may re-check that the columns have been filled out approrpiately:

Installing denoise profiles

To make the (optimized) denoise profiles available in your production database, execute the following line of Bash code inside the folder where the generated library.db is located:

Afterwards, the SQL file exported_presets.sql contains INSERT statements that can be imported into the production database, which is normally located at ~/.config/darktable/library.db. The following Bash code (to be executed in the same folder where exported_presets.sql is located) performs this step and additionally creates a backup of the previous state of the database.

Uninstalling denoise profiles

If you are unhappy with the denoise profiles, the following command may be used to uninstall a preset from the production database:

 Downloads

I provie all scripts and the generated library/presets.txt for the Canon EOS 100D and the Nikon COOLPIX P7700:

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Please type the characters of this captcha image in the input box

Please type the characters of this captcha image in the input box