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

License plate extraction doesn't work on HEIC files #263

Closed
josephfrazier opened this issue Feb 11, 2021 · 0 comments · Fixed by #264 · May be fixed by #266
Closed

License plate extraction doesn't work on HEIC files #263

josephfrazier opened this issue Feb 11, 2021 · 0 comments · Fixed by #264 · May be fixed by #266
Labels
bug Something isn't working

Comments

@josephfrazier
Copy link
Owner

josephfrazier commented Feb 11, 2021

Here's a test image https://share.icloud.com/photos/0-5_Dy6WhkGw_7G-mlzadci-w#New_York

I suspect openalpr doesn't support HEIC, and we might need to convert to JPG on the server before sending to openalpr, see lovell/sharp#2004

If we can't get sharp working, try https://www.npmjs.com/package/heic-convert

@josephfrazier josephfrazier changed the title HEIC files are not supported, license plate extraction doesn't work License plate extraction doesn't work on HEIC files Feb 11, 2021
@josephfrazier josephfrazier added the bug Something isn't working label Feb 11, 2021
josephfrazier added a commit that referenced this issue Feb 11, 2021
…nalpr

This adds about 6 seconds of latency since `heic-convert` is written in
JS, but it's better than nothing. Maybe I can get `sharp` working at
some point.

Fixes #263
josephfrazier added a commit that referenced this issue Feb 11, 2021
…nalpr (#264)

This adds about 6 seconds of latency since `heic-convert` is written in
JS, but it's better than nothing. Maybe I can get `sharp` working at
some point.

Fixes #263:

> Here's a test image [share.icloud.com/photos/0-5_Dy6WhkGw_7G-mlzadci-w#New_York](https://share.icloud.com/photos/0-5_Dy6WhkGw_7G-mlzadci-w#New_York)
> 
> I suspect openalpr doesn't support HEIC, and we might need to convert to JPG on the server before sending to openalpr, see [lovell/sharp#2004](lovell/sharp#2004)
> 
> If we can't get sharp working, try [npmjs.com/package/heic-convert](https://www.npmjs.com/package/heic-convert)
josephfrazier added a commit that referenced this issue Feb 11, 2021
This drops the latency from 6 seconds down to 1. However, it requires
libheif and libvips to be installed, so I need to figure out how to do
that on Heroku before this can be merged. On MacOS, this made it work
(see lovell/sharp#2004 (comment)):

```
brew install libheif
brew install libvips
yarn remove sharp && yarn add sharp
```

Fixes #265:

> See #264:
>
> > This adds about 6 seconds of latency since `heic-convert` is written in
> > JS, but it's better than nothing. Maybe I can get `sharp` working at
> > some point.
> > Fixes #263:
> > > Here's a test image [share.icloud.com/photos/0-5_Dy6WhkGw_7G-mlzadci-w#New_York](https://share.icloud.com/photos/0-5_Dy6WhkGw_7G-mlzadci-w#New_York)
> > > I suspect openalpr doesn't support HEIC, and we might need to convert to JPG on the server before sending to openalpr, see [lovell/sharp#2004](lovell/sharp#2004)
> > > If we can't get sharp working, try [npmjs.com/package/heic-convert](https://www.npmjs.com/package/heic-convert)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant