LPR Analytics: Hikvision > GMail Api

First, we setup a Hikvision LPR cam to send emails via Gmail's SMTP service whenver it detects a license plate.

The email looks like:

This is an automatically generated e-mail from your NVR.

EVENT TYPE: vehicle exception EVENT TIME: 2021-03-09,07:55:44 NVR NAME: DeepinMind NVR S/N: 0820190830CCRRD56461520WCVU black vehicle list: white vehicle list: normal vehicle list: [8QPR577]

Second, we use the GMail Api to fetch emails matching a certain criteria. E.g. all plates in the last 3months.

service.users().messages().list() // get message ids matching criteria service.users().messages().get // fetch messages by ids

That's it. This allows a variety of programmatic automations such as text-notifications when a black-listed car arrives, generate a frequency attribute of visits for each plate, push notifications for an unknown visitor arriving past midnight etc.

essays | tech