Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate Showcase app: "region of interest" for text recognition is not what is shown in the reticle #29

Open
sheepmaster opened this issue Jun 28, 2020 · 2 comments
Assignees

Comments

@sheepmaster
Copy link
Collaborator

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).

@sheepmaster
Copy link
Collaborator Author

@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)?

@owahltinez
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants