robmarkcole / HASS-plate-recognizer

Read number plates with https://platerecognizer.com/
135 stars 28 forks source link

Image Processing #79

Open JasSmiths opened 1 year ago

JasSmiths commented 1 year ago

Hi @robmarkcole

First off thanks so much for this integration, it's truly superb and one that I use every day.

I've got a strange issue that's started recently, when motion is detected by the camera my automation triggers the Scan Platerecognizer service, the image that is collected and sent to the platerecognizer api is a few seconds earlier than when motion was detected - Very strange.

For background information - Im using this on a Gate to my house in order to open for the correct people automatically, however the image thats being taken is before the vehicle has turned onto the driveway and therefore the number plate isn't visible.

Would it be possible to have the ability to specify an image file url to send to the API rather than the service collecting the image itself? I've tested this manually and the snapshot taken is perfectly in line with when the motion was detected.

This would mean that I could simply take that camera snapshot and feed that through to the API.

Thanks Jason

robmarkcole commented 1 year ago

Hi Jason, it's been a while since I worked on HA integrations but I think what is required for that workflow is a new service for the integration. The service would accept the image url and process it. So you want to make a pull request adding this feature?

weswitt commented 1 year ago

i'm doing exactly what you're tying and i have it working. i think if you refine your zones you can make it work. i use multiple zone for the object detection. the car has to transition from one zone into another. by doing so it ensures that the car is in the right place for alpr to work.