5 ms·
Sounds like local contrast adjustment. There are several different ways of solving it, here's a couple that look like they work pretty well: https://stackoverf
by sorenjan 4y ago
Sounds like local contrast adjustment. There are several different ways of solving it, here's a couple that look like they work pretty well:
https://stackoverflow.com/questions/63251089/how-to-do-a-localized-contrast-enhancement-in-a-scanned-image-using-opencv-pytho https://stackoverflow.com/questions/63251089/how-to-do-a-loc...
https://stackoverflow.com/questions/65666507/local-contrast-enhancement-for-digit-recognition-with-cv2-pytesseract https://stackoverflow.com/questions/65666507/local-contrast-...
One possible preprocessing step could be to do a high pass filter on it, if the shadows vary slowly over the image.
There are also more specialized techniques specifically for removing shadows from documents, like these:
http://civc.ucsb.edu/graphics/Papers/ACCV2016_DocShadow/ http://civc.ucsb.edu/graphics/Papers/ACCV2016_DocShadow/
https://faculty.iiit.ac.in/~vgandhi/papers/shadow_removal_camera_ready.pdf https://faculty.iiit.ac.in/~vgandhi/papers/shadow_removal_ca...
I also found this, an image editor based approach if you just want to do a few images manually:
https://janithl.github.io/2021/12/remove-shadows-and-uneven-lighting/ https://janithl.github.io/2021/12/remove-shadows-and-uneven-...
- Rygian 4y agoThanks! These pointers will be very helpful.