The document extraction API is not able to overcome the laws of physics and works exclusively within its capabilities. The image resolution should be at least 1280x720. However, 1920x1080 is recommended.
For the document extraction API to work at its full potential it is important to follow the image input guidelines as stated below. Each section contains good and bad examples to help visualize any issues you might experience regarding bad lighting, misalignment, reflections, etc.
The document should not be tilted or turned more than 10 degrees in any direction or orientation.
The document should be in clear contrast to the background. A light-colored document on a light background, as well as a dark-colored document on a dark background, might not be recognized.
Ensure that the document does not take up too much or too little of the screen real-estate. A good ratio to aim for is to keep the document between 70% and 90% of the screen real-estate.
The document should be in focus and not blurred.
Ensure that the image has proper lighting conditions. Avoid over exposure, under exposure, too much or too little background or foreground lighting, glares, and reflections. Ensure that all the details on the document are visible.
Remove all obstructions, such as fingers covering the document.
Avoid glares and reflections. If possible, avoid using the flash as it can often cause reflections on the document.