extract "paper" from document scan?



I'm scanning old books, maps, pamphlets etc.

In general, I have either uneven lighting, faded
or stained originals, or both.

What I would like to do is extract "Just the paper",
and then smooth (blur?) it, and then use this as
a lighting (and/or staining) reference for processing
the main scan.

At the hand waving level, I would like to remove
all the marks (defined as "darker than some threshhold value")
and then replace the pixels I just removed with pixels
generated by interpolation from the remaining pixels.

But I can't quite put my finger on a sequence that works.

I would (ideally) like to code this as a shell (or perl)
script driving netpbm or imagemagick (I'm working on Linux),
but all suggestions will be given careful attention.

Thanks for any help you can give me,

BugBear
.



Relevant Pages

  • Re: extract "paper" from document scan?
    ... In general, I have either uneven lighting, faded ... and then replace the pixels I just removed with pixels ... make thresholding easier. ... I also have a series of tools to aid in shell based image processing, ...
    (sci.image.processing)
  • Re: extract "paper" from document scan?
    ... In general, I have either uneven lighting, faded ... and then replace the pixels I just removed with pixels ... to make the characters stand out. ... make thresholding easier. ...
    (sci.image.processing)