enhance_book_photo is a command-line tool for enhancing photographs of pages from books. On such photos, the light is usually not equal on all parts of the picture; some parts are brighter, some parts are darker. This can disrupt OCR or reduce the efficiency of conversion to djvu. enhance_book_photo equalizes the brightness of such photos.
I didn't know R before. I saw this article on Freshmeat. I found R is what I need now. I started using R. Thanks.