android - What is the best way to instruct user to capture a clear or better image of a document.? -
i working on app user needs click image of document , upload , server further processing of doing ocr , extracting specific data it. ocr , data extraction depends on image quality. best way, can instruct user take near perfect image of document @ run-time.
factors considering.
1) light available while capturing image (can't use light sensor
because present on front side of phone whereas document on bottom side)
2) document angle. (tried edge detection using opencv
not works on white document light color background surface. edge detection tutorial run-time document detection on custom camera surface great help)
3) distance document.
processing image after capturing (transforming document rectangle using opencv
) not giving great result ocr
because of character distortion.
so please suggest way instruct user take better image of straight document perfect distance , better lightening conditions. , after capturing best way judge image quality.
if proportions of document known, can draw appropriate inner (for min document size) , outer (for max document size) bounding rectangles on preview (as shown on pict) , control user positioned document within outer , on inner bounding rect. helps control right document angle. can control tilt , orientation of smartphone described in answers this questions.
then process preview image (or small copy) on-the-fly lightweight quality estimation algorithms , inform user low quality , reason (e.g. low brightness, can estimate brightness of outer rectangle region, example, described in this question) and, may be, block "take snapshot" control.
Comments
Post a Comment