darktable 4.2.1: No "hot pixel" correction for monochrome RAW files (eg. from converted cameras)?


I tried to activate the “hot pixels” module for RAW files from my K-5IIm (m stands for converted to monochrome by removing the CFA). It seems that darktable doesn’t “recognise” neither a DNG nor a PEF as a RAW file and refuses the hot pixels correction.
The search here on pixls.us and Issues · darktable-org/darktable · GitHub didn’t help me.
The closest match for my search seems to be this one: sRaws / DNG LinearRaws and monochromes get assigned JPEG (non-raw) workflow · Issue #14558 · darktable-org/darktable · GitHub

Or did I something wrong?

Thank you very much.


Propably hard to tell without the chance to putting the hands on a sample file.

Thank you for your quick answer.
Here are the files - a DNG and a PEF.
20230522_143623.DNG (18.1 MB)
20230530_210017.PEF (20.8 MB)


Seems to work for me (both files).

Have you adjusted threshold and strength? Or, what exactly do you mean with “refuses the hot pixels correction”?

That’s good because that means the issue is a PEBKAC.

I can’t activate the “hot pixels” module.

Many thanks.


Hm, I did a fresh install of 4.2.1 with a fresh config folder to test this (I normally use current master stuff).

Would you dare to temporarily rename your .config/darktable folder and test with a fresh configuration? Maybe there are some strange old settings hidden somewere?

I did so and applied the two presets for mono: disabling white balance module and setting the demosaicing method to “passthrough (monochrome)”, because there isn’t a CFA on that sensor any more.
Turns out that the passthrough setting disables the “hot pixels” module.

Probably this one addresses that issue: ioporder: Do not apply JPEG module order for RAW/mono images. by TurboGit · Pull Request #14570 · darktable-org/darktable · GitHub

Nonetheless even without the “passthrough (monochrome)” setting in the demosaicing module the “hot pixels” module doesn’t seem to remove the hot pixels. Have to investigate that tomorrow…


I can say: no, it doesn’t. Just updated my build and in fact passthrough (monochrome) still disables hot pixels. I think I would demosaic and then use color calibration in channel mixer mode to desaturate the slight tint.

At least you are getting closer.

1 Like

The “hot pixel” algorithm has no code for monochrome sensors so it’s disabled for such images on purpose. Only bayer and xtrans are supported.

1 Like

Thank you for that clarification. That explains it.

Fortunately ART and RawTherapee can remove the hot pixels on these monochrome images - it’s good to have these alternatives.


PS: I changed the title of the thread so that it’s easier to find and because it is not an issue with Pentax in particular. It’s just one thing to keep in mind at the moment when working with darktable on monochrome images.

1 Like

I understand the desire to have monochrome images supported too. Will do for 4.6 (we are in feature freeze for 4.4 already)

EDIT: pr has been done just now :slight_smile:


Thank you for that - and good to know that it is on the list.

Just for the record: I didn’t intend to blame darktable or anyone who works for that project. It’s a great program, I like it very much. My situation (a camera converted to monochrome) hit a current boundary of darktable. Imho ART or RawTherapee are the better tools for these images at the moment.
So I’m grateful to the people who give us these alternatives.


What are you missing then on dt? We constantly try to improve so any suggestion is appreciated …

1 Like

Thank you for asking. :slightly_smiling_face:

The “hot pixels” functionality for monochrome images is currently the “nicest to have” feature.
It would be good if the “auto apply this preset to matching images” could have additional criteria, in particular the serial number of the camera.
My background for that is: I took colour images with a K-5II with CFA and monochrome images with another (converted) K-5II. At the moment I don’t see a possibility to apply the mono preset automatically only to the images of the monochrome camera.

Thank you again.


We have something for you.

In your camera setup you will probably be able to write monochrome jpegs? When shooting raws the previews will be monochrome. DT can check via “detect monochrome previews” and your images will be detected as monochrome and you setup a preset :slight_smile:

Bildschirmfoto vom 2023-05-31 21-07-18

1 Like

Thank you.

Yes, the K-5IIm is set to monochrome because it produces only monochrome images and dt is configured as in your screenshot.

The remaining uncertainity in the current automatic application of passthrough is that images from a non converted camera (same model) taken in “monochrome” are false positives. The RAW data contain all colour informations due to the CFA. Therefore a demosaicing method other than passthrough must be applied.

Currently it’s the cheapest step into the “pure” monochrome world to remove the CFA from an older camera, in particular in the Pentax universe. In my perception (based on the reports about successful conversions in Pentax related forums) the number of people doing so is increasing.

Perhaps additional criteria for automatically applied presets are useful for other uses as well - “Besser haben und nicht brauchen als brauchen und nicht haben”. :wink:


1 Like