Remove highlighter pen mark from scanned document

I am working with some scanned historical documents.

At some stage someone used a highlighter to mark upo the physical pages. I would like to remove this from the scan if possible.

I have about 90 pages to work with, so I would love if someone could suggest a reproducible workflow.

Untitled.tif (720.9 KB)

Hi @Jamie, and welcome.

Here is a swifty, where I have used just one
module in darktable, viz. the Color lookup table.


Untitled.tif.xmp (6.8 KB)

The settings of that module can easily be applied to all
your scannings.

There are forumers that are much more skilled than I
in sw such as The Gimp, g’mic &c, and I presume they
will chime in for even faster solutions…

Have fun!
Claes in Lund, Sweden

2 Likes

I tried using the Darktable Color Calibration module.


Untitled1.tif.xmp (3.0 KB)

2 Likes

HI @sls141 & @Claes

They both look pretty good. I’m not very familiar with Darktable. Could you tell me what values you used with those tools?

Gimp
You might get an improvement. Tools → GEGL Operation → Color warp

Works like this https://i.imgur.com/Vytir8a.mp4 Last used settings are saved.

@Jamie I’m using Darktable 3.8. You can just download the .xmp files. You’ll need to rename them however.

2 Likes

GIMP:

In Select by Color tool play a little bit with Feather Edges Radius and Threshold values to get desired selection of color.

3 Likes

The darktable color zones module also works.


Untitled.tif.xmp (3.0 KB)

2 Likes

I made an LUT you can use. I used Gimp GMIC plugin with the filter ‘apply external LUT’ to test.

Results:


LUT:
unhighlight

3 Likes

If you are looking to do it just in gimp.

  1. colour pick the highlighter colour.
  2. Add layer of that colour.
  3. Colour erase layer mode. Then merge layers
  4. Because you now have transparent spots where the highlighter was add another white layer and move it to the bottom.
  5. Merge those layers and desaturate.
2 Likes

Thanks everyone for your suggestions and examples. That is so helpful! I’m new to the forum and didn’t know what a wonderful resource it is. Thanks again!