Open josephfrazier opened 6 years ago
If we upload the images client-side as described in https://github.com/josephfrazier/Reported-Web/issues/8#issuecomment-390331042, we could just pass the URL to the server and use recognizeUrl
from openalpr: https://github.com/openalpr/cloudapi/blob/8141c1ba57f03df4f53430c6e5e389b39714d0e0/javascript/docs/DefaultApi.md#recognizeUrl
However, we then wouldn't be able to re-orient the image based on its EXIF data, unless we were to download it server-side. See https://github.com/josephfrazier/Reported-Web/issues/1#issuecomment-382251401
EDIT: Opened an issue on the Cloud API repo: https://github.com/openalpr/cloudapi/issues/16
EDIT: Ryan is working on S3 uploads for videos: https://reportedcab.slack.com/archives/C85007FUY/p1535835121000100
There's a couple of things at play here:
base64 conversion might take a bit of time, and could likely be done on the server instead of the clientdone in https://github.com/josephfrazier/Reported-Web/commit/df50343b7e881281a1621c9241b051b996da3824 and https://github.com/josephfrazier/Reported-Web/commit/c54ce35e5b3f06e204af0ed764cf910327092fb9recognizeFile
function. However, see https://github.com/openalpr/cloudapi/issues/17#issuecomment-392383398Resizing images on the client using something like https://github.com/nodeca/pica could help here, but it might also reduce the effectiveness of openalpr. Could also compress requests (EDIT, this might not be effective since JPEG is already compressed): https://medium.com/axiomzenteam/put-your-http-requests-on-a-diet-3e1e52333014