Enhance the quality of scanned PDF #1517
-
Sorry to disturb, but is there a way in enhance a scanned PDF quality (make dirty greyish background white and make the contrast higher)? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
You do not disturb at all, no worries.
In general no, this is out of PyMuPDF's scope. It actually is an image enhancement topic. You might want to consult Pillow documentation for this. There are a handful of things in PyMuPDF which may also help, e.g.
|
Beta Was this translation helpful? Give feedback.
-
Let me transfer this to a Discussion. |
Beta Was this translation helpful? Give feedback.
You do not disturb at all, no worries.
In general no, this is out of PyMuPDF's scope. It actually is an image enhancement topic. You might want to consult Pillow documentation for this.
Also, OCRmyPDF has a feature in that area if I remember correctly. Including improvement of the scanned image orientation.
There are a handful of things in PyMuPDF which may also help, e.g.
pix.samples
. Like making it white based on some threshold, e.g. if for an RGB image the pixel is greater than(200, 200, 200)
replace it by(255, 255, 255)
or whatever. But …