Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plugin for rectifying/fixing-up scanned documents
#1
I'm a newbie when it comes to GIMP plugins. GIMP itself I've been using occasionally for many years, but never really got deeply into it.

I have the habit of scanning official documents I get on paper. After scanning, what I typically do is open up GIMP to some rotation, work on levels, rotating and choosing a format and compression for saving the file. In very rare cases I feel confident enough to use distortion transformations on the page, myself, but am usually unsatisfied with the result.

Recently, I've been positively impressed by the semi-automatic rectification + other fixup work you can get on your scans with gratis (but non-free) mobile phone apps like CamScanner. This got me thinking that perhaps such functionality has been made available in GIMP via plugins.

So, here's the overall list of actions I'm interested in (with the first being the most important):
  • Rotate the image to make sure the text is straight up and that what seem like rectangular region borders are indeed rectangular and parallel to the edges
    (Perhaps with prompts for the user to verify which regions to rectify).
  • Page crease artifact removal.
  • Figure out the page boundaries
  • Crop to the page boundaries  (or a little further than that, for uniformity with other pages in the same sequence of scans)
  • Adjust levels, to try to get the text to be black, its surrounding gradient to the background not too jagged nor disappear, and the background be white with most noise becoming white.
  • Stain/spot removal.
  • Avoid the level adjustment for regions such as photos printed on the page (which might get their own level adjustments) - and don't take the histogram for these regions into account for the rest of the image
  • Detect cases of significant local non-grayscale content; decide whether to make the whole image grayscale if these don't exist; make sure these don't become to "garrish" due to level corrections, e.g. by playing with their saturation after a global levels transformation.
there might be more I suppose.

Please don't suggest I write my own. That may be relevant in theory, but will not happen in the foreseeable future. :-(

PS - Also posted a similar question on http://softwarerecs.stackexchange.com .
Reply


Messages In This Thread
Plugin for rectifying/fixing-up scanned documents - by einpoklum - 04-25-2020, 08:38 AM

Forum Jump: