OpenCV can perform such operations.
Here is a tutorial for contrast and brightness.
OpenCV comes with android ports and a fairly active community.
A good starting point for you would be cvEqualizeHist , which automatically adjusts brightness and contrast for single-channel (BW) images.
You can find fairly simple methods for finding automatic settings, but I think it will still require a bit of work on your part, though :).
source share