You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
I'm trying to use the library with a Samsung Galaxy A5 2017 and the cropped image not work correctly (even though the rectangle is recognized correctly):
When I use with a Samsung Galaxy s9 Plus it wok correctly:
Do you have an idea what could cause that ?
Sebastian
The text was updated successfully, but these errors were encountered:
@sebacura Thanks for trying out the package. As I'm sure you've tried other packages for solving this issue, most of the packages for image detection and cropping are pretty buggy. I actually rebuilt this one from the ground up while most are just forks based off of a gist from some random android dev (seriously). So while I solved plenty of the bugs there are still some minor nuances that show up and this is one of them.
Android has an interesting api for interacting with the camera. There's a preview screen size and a captured image screen size that you need to set up. These can be different ratios and different resolutions. This package has code to handle transforming the detected area coordinates to map to the captured image size and ratio but every so often I've found it to be a little off in Android and honestly I am not sure why. What I think it is is something to do with the actual hardware of the device and how it is reporting the camera output to the code. This is why it is different from device to device (and why developing for iPhones is so much easier because everything is consistent).
So probably not the answer you are looking for but that is the honest answer.
One thing I tell everyone who has issues with this package is to try to only use the package at 100% screen size (no headers or footers) because sometimes that will skew the images or at least when I tested this on a variety of phones, that is what was the most consistent at working. (I use this package in production!) I did notice that usually issues were isolated to older android phones.
If you have any android dev experience I'd love for you to take a crack at this. I believe I structured the code fairly readable.
Hello,
I'm trying to use the library with a Samsung Galaxy A5 2017 and the cropped image not work correctly (even though the rectangle is recognized correctly):
When I use with a Samsung Galaxy s9 Plus it wok correctly:
Do you have an idea what could cause that ?
Sebastian
The text was updated successfully, but these errors were encountered: