I want to take an image of a document that was photographed and make it look like it was scanned. Since a scanner will put a constant light source over the whole document, I want to achieve that effect on a photo of a document. The desired effect would be to remove any shadows or areas of low light (or at least make them less noticeable) and have the whole photo be fairly bright.
My first thought would be to locate the brightest part of the target image, and them make the whole image that brightness. Assuming that's even the right algorithm, how would I do it in PIL? Is there a get brightness method? etc?
(This is a follow-up to this earlier question.)