Mobile Image Capture Quality

I am building a mobile app that will enable users to capture an image of a paper document and submit it for processing. One of the requirements I have is to check the quality of the image to ensure that it is not blurry and is human readable. The paper documents contain detailed information about medical procedures. Does anyone have suggestions about a javascript and/or java library that they have used that is suitable for this? Thanks! Mike
1 answers

There are java package that takes text out of an image. Stack overflow thread

Afterwards you could do a word count to ensure that a large enough amount of text could be read. If a document is not readable for the comptuer, then it also will not be very human readable.