|
|
|
|
|
by crazygringo
1351 days ago
|
|
If your content is black and white, just use a local contrast filter and then threshold it. It's easy to do, but it does result in monochrome so you lose antialiasing. If you're at 300+ dpi though that doesn't usually matter. This is commonly done with PDF scans where monochrome output is desired for high compression. Easy to do with ImageMagick. If you want to preserve aliasing and also color generally, I'm sadly not aware of any open source solution for that. Various scanner apps seem to do it with varying degrees of success; I'd be curious if there's a standard algorithm for it. It feels related to the de-curving algorithms that take a book page and make it flat. So you'd be modeling both the page curvature and black/white values simultaneously. Seems possible for general lighting/shadow, but wouldn't work for reflectivity from camera flash. |
|