josephfrazier / reported-web

Web front-end for https://twitter.com/Reported_NYC: https://reported-web.herokuapp.com
https://reported-web.herokuapp.com
MIT License
10 stars 1 forks source link

Image upload for openalpr/submission can take a long time #9

Open josephfrazier opened 6 years ago

josephfrazier commented 6 years ago

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:

Resizing 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

josephfrazier commented 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