If we have, for example, a 800 × 600 image from a webcam and we detect a document in it, it is very likely that the document does not occupy more than 80% of the area. If this webcam is a portable standard, it is most likely that it has a fixed (non-automatic) focus and that the document is not focused at this distance from the camera. In this case, keep in mind that if for a human eye is difficult to read it, the reliability of the OCR won’t be perfect.
If the document we are talking about is an identity card (TD1), its size is 86 × 54 mm. Let’s do the calculations: 800 pixels * 0.8 (80%) / 86 mm * 25.4 (mm per inch) = 189 PPI. Which would be below the limits of any OCR, since the font used, for example, in the German ID cards (TD2) is only 2 mm high, which would translate into 15 pixels, in which we should also consider JPEG compression loss and background noise.
To obtain the expected results, this image must be at least 300 PPI / 25.4 = ~ 12 pixels per mm (ppm) -> 86 mm * 12 ppm = 1032 pixels for the width of the document -> 1032 / 0.8 (80 %) = 1290 pixels for the width of the image, assuming that the document is perpendicular to the camera.
In the case of a passport (MRP) or visa (MRV) of 125 × 88 mm, we will consider 125 mm * 12pmm = 1500 pixels for the width of the document -> 1500 / 0.8 (80%) = 1875 pixels for the width from image.
However, MRTDs (Machine Readable Travel Documents) have MRZs (Machine Readable Zone) with lower resolution restrictions than those described if it is not necessary to compare data with the visual zone (VIZ) to check the integrity. In this case, an image of 800 × 600, will be recognized without failures in 90% of cases if all other requirements of image quality are met.
To summarize, it is recommended to obtain the images with a Full HD resolution camera (1920 × 1080) with autofocus for any size of identity document. Do not forget: