|
|
|
|
|
by Rygian
1349 days ago
|
|
This is almost identical to a problem I'm trying to solve, which is to turn a potato-quality picture of a sheet of paper into a clean scan, turning whatever levels of gray conform the paper background become a uniform #ffffff white. The obvious solutions (equalizing, converting to bitmap, …) don't work because what's white in the top left (say #ccc) is wildly different from what's white in the bottom right (say #888), and the shift is non-uniform due to potato-quality lighting. Glad I caught this post, I hope the solution can contribute to my problem (although I do not have a way to obtain a fixed ground truth — lighting will change for each picture.) |
|
https://stackoverflow.com/questions/63251089/how-to-do-a-loc...
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/
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-...