Best despeckle strategy for old drawings

Hi all DT users.

I am struggling with scans of old drawings, trying to clean them without losing the details. Let’s say I have such sample:

I got best results with denoise (profiled) module but there is nothing for free - I’m losing some details. I know DT is mostly for raw photos editing but I like its powers and use it for JPEG and TIFF bitmaps too. So, two questions:

  1. do you have some “magic” method to get rid of dust, speckles etc. for this particular material,
  2. or maybe I’m trying to hammer a nail with a meat mallet instead of real hammer (in other words, I should use another software).

Any help is more then welcome.

Have a look at Gimp and wavelet decompose:

1 Like

There is no one-click dust removal module in darktable. But you could make use of…

  1. retouch module for removing speckles (manually)
  2. retouch module with wavelet decompose option to selectively blur speckles or dust on different wavelet level
  3. use darktables powerful masking options to have denoise module (or any other suitable module) work only on backgrounds, not on main objects
1 Like

Thank you for the proposals. In my situation, when I have many illustrations to repair:

retouch module for removing speckles (manually)

Much too much work!

retouch module with wavelet decompose option to selectively blur speckles or dust on different wavelet level

But it requires lot of manual work too - even more because every wavelet “layer” needs to be repaired separately - or am I wrong?

use darktables powerful masking options to have denoise module (or any other suitable module) work only on backgrounds, not on main objects

It sounds interesting. My knowledge about masks is quite modest but I imagine the process more or less:

  1. I draw mask around objects (in my sample - around the parrot), as accurate as possible,
  2. invert the mask (like inverting the selection),
  3. work with the background with denoise and/or retouch module.

If I’m messing something, correct me please.

Wavelet decompose looks very interesting for this task but, if I’m thinking correct, I have to clean every “layer”?

You have two levels of structure in the background:

  • the structure of the paper
  • dust, decolorations of the paper (fungus?), perhaps other spots. Of these, fungus spots (yellow/brown) are in the paper, dust of course is deposited on top (or on the scanner glass).

The latter are larger than the paper texture.

If you want to keep the paper texture, you’ll probably have to remove each of larger blemishes by hand (retouch module, which does have the advantage that you recover some texture in the retouched areas). Any denoise procedure aggressive enough to get rid of the large artefacts will smooth away all of the fine detail in the background (and the bird, if it’s not protected through a mask). That’s not specific to dt, but inherent in how denoising works, so switching to another software won’t help there.

As an alternative, you can of course mask out the relevant areas of the picture, and add a large amount of exposure to the rest (turning the background to pure white).

Or, if you are only interested in the bird, crop out as much as possible of the background before removing the remaining spots.

A lot depends on why the scan was made. If it’s to be an archival record of the original page, you won’t treat it the same way as when it’s an illustration aimed at showing the bird species.

1 Like

Fully understand, that 1 and 2 are a lot of manual work and that you want to have an option to quickly remove everything except the main object.

Yes, that is an easy option!

You could try to save time by

  • roughly drawing a mask ("drawn & parametric mask) around the object (not very accurate)
  • invert it, yes
  • switch on “display mask” option
  • play around with mask refinement parameters (feathering, blur, opacity, contrast)

In your use case it should be quite easy to refine the mask to have everything except the object (parrot) masked for denoise (or whatever module you want to use)

you can find all about masks in the manual: https://docs.darktable.org/usermanual/3.6/darkroom/masking-and-blending/

1 Like

If your birds stand out from the background you can use the parametric mask and only select the background.

  1. Select parametric mask
  2. Select the different parametric mask parameters (luminosity, hue, chroma) by clicking the eyedropper and drawing a rectangle in the background
  3. Play around with mask refinement
2 Likes

Much thanks to all of you. I have to try different methods and find the best. I’ll share the results in few days (or I’ll come back with additional questions).

1 Like

OK, after some time wasted for life :wink: I come back with my thoughts. Darktable is good but it is almost impossible for me to set appropriate parameters (g, R, G, B etc.) values to get exact mask (*). I found it is much easier to use Gimp for this task - especially Foreground Selection Tool and Fuzzy Selection, of course with some tuning. Then I can export it to TIFF and do other processing in Darktable.

Thank you all for help and advice.

(*) Of course it is possible with some specific samples and much of experience.

You usually combine that with some amount of feathering to get the perfect mask