Open sheepmaster opened 4 years ago
@owahltinez How is the fit of the camera image into the preview view determined? Fit the image (centered) into the view and crop anything sticking out (i.e. https://developer.android.com/reference/android/graphics/Matrix.ScaleToFit#CENTER)?
It is center-cropped (like you described). Currently you have to translate the coordinates yourself after accounting for the cropping, but this is something the team is actively working on and soon it will be much easier for developers to achieve WYSIWYG behavior. We might also see the ability to do letter-boxing (black bars instead of center-cropping) coming to PreviewView but I don't think that's very high priority right now.
The reticle overlay over the preview image is set to a certain percentage (by default 74% x 8%) of the preview view. The image from the camera is cropped to the same percentage, but the image might not actually have the same aspect ratio as the preview view, which can result in text that is outside the overlay being recognized (or possibly text inside the overlay not being recognized).