New to LPR? Considerations Before You Begin

samplenhold

Known around here
Joined
Aug 8, 2018
Messages
1,904
Reaction score
3,628
Location
Spring, Texas
Thought I would throw together a post on my experiences so far with LPR in an effort to help others that are considering running down that rabbit hole. There are some practical considerations you should know about LPR. I am approaching this from the position of using Blue Iris and Plate Recognizer Snapshot as that is what I have done so far. If you are using an NVR or some other plate OCR, then some of the discussion may not apply to you.


Plate Recognizer (PR) is very easy to set up in Blue Iris (BI). It uses the Alert image from the trigger alert in BI. BI sends that Alert image to PR and PR returns the plate number to BI. It gets written to the BI log file.


LPR is part science and part art. I see so many posts on IPCAMTALK by newbies, usually during their introduction post, where they state they are going to set up a bunch of cams, including LPR, right off the bat. Most state that they want to use one cam to get an overview of the street and get plates with it also. Of course, we always state that in most cases, a cam for LPR should only be used for LPR. This is usually stated since reading plates requires the cam to be quite zoomed in to the street and at night it needs fast shutter speeds and lots of IR such that the only thing that is not totally black is the plate and the car lights.
Night.jpg
But what about all of the other considerations for LPR?

I started down this path at the end of 2019, after most of my cam plan was finished. First thing to consider was ‘what do I hope to accomplish with LPR?’ I live on a corner in a subdivision north of Houston Texas, outside of the city limits. The corner is a ‘T’ intersection with the top of the ‘T’ running NE/SW in front of my house and the base of the ‘T’ running NW/SE alongside of my house. I was hoping to get as many plates as possible and have a way to store the plate numbers along with date, time and other info that would allow me to search for a plate to see when it passed by. Texas is a two-plate state. Most vehicles, but not all, have both a rear and a front plate. If I focus a single cam on the intersection, I would miss a lot of plates if the car did not have a front plate. So I decided on two cams, one pointed at the intersection and one pointed down the road running in front but to the SW. I have called these cams LPR-E (intersection facing NE) and LPR-W (facing down the road to the SW).
InkedIMG_8200_LI.jpgIMG_8204.JPG

I took me quite a while to find the most appropriate place to put the cams. I sat out on the front porch, took many pictures and walked the street thinking of where to place them. I used Google Maps and the IPVM Calculator to help with the design. I wanted something that would blend in and not scream CAMERAS HERE! So I decided to build a box to house the cams and place it in the garden behind a pine tree. I looked at all of the threads in the LPR sub forum and knew that the big issues facing me were distance and angle. Would that spot work for me? So I stood at the tree and took pictures of cars coming by. Zooming in on the plates from those stills looked promising.

garden box location.JPG Test location LPR-E.JPG Test location LPR-W.JPG

So I bought one Dahua HFW5241E-Z12E which was the current cam in the prosumer line that was being used for LPR. It has enough zoom (5-60mm) for my locations based on the IVPM Calculator. I set it on a box behind the tree and let it capture video in both directions and it looked good, I could read them. I sent stills from the video to Plate Recognizer and they all were read just fine by it. So I was encouraged and bought the second cam.
Plate Rcognizer test 4.JPGPlate Rcognizer test Ew4.JPG

This is the setup as shown in the IPVM Calculator. LPR-E angle is about 26 degrees and distances are 40-150’. LPR-W angle is about 36 degrees and distances are 70-130’.

Design.JPG

So on this design, the only plates I will not get are it the vehicle does not have a front plate and they make the turn onto the NE part of the ‘T’.

I won’t go into the running of cable and building the box. Maybe I will do another post covering that. But below is the cam box and some shots showing the placement and views of the street.
Cams in box.JPGLPR-E Box view.JPGLPR-W Box view.JPG

Considerations:

ANGLE
The angle will set how much your plate is foreshortened. This to me is the issue that impacts how well OCR does on reading the plate. In using PR, the more at an angle the plate is the less the accuracy is. PR has a hard time with M, H, N, W, Y, V, 6, G, and T. Also T, I, 1, and 0 vs O. At least for the Texas fonts. But if the angle is close to zero, it has no issue. This is mostly a problem at night, but I have seen this issue during the day also.

Was read by PR as CTI2357
CTI2357 - error.JPG
But this view was read correctly by PR as CTT2357
CTT2357.JPG
This was read as DHL2683 but is really DML2683
DHL2683 error.JPG

DISTANCE
The further away the plate, the harder it is to read. However, the farther down the road, the lower the angle. So with the proper zoom, it can help minimize foreshortening.

SPEED
To get a plate that you can read requires fast shutter speeds, like 1/2000sec. That is needed to ‘freeze’ the plate. The faster the car, the less likely you will get a non-blurry plate. FPS has NOTHING to do with it. It is totally shutter speed and Iris. No different than sports photography. The speed also impacts getting a trigger alert and the position of the vehicle in the snapshot. So depending on the speed, the plate may or may not be in the frame.

Too slow to get plate in frame
speed.jpg

ZOOM and FOV
The zoom and FOV go hand in hand for impacting the success of the plate capture. Too little zoom and the plate is too small to read. Too much zoom and the FOV is such that the car fills the whole frame and the trigger may not work or the plate is not in the frame.

LIGHTING
The sun can be your friend, but it can also kill a plate cap. It can overexpose the plate and make it unreadable.
sun.jpg
At night, even though you are using IR, conventional lighting does play a part. I did not realize this until @Wildcat_1 posted his night review of the 5442 cams where he showed IR only, conventional light only, and both. I am lucky in that I have two street lights near the corner and one down the road. These do help get decent night time shots.
Street Lights.JPG night front good.JPG Night good W.JPG

DIRECTION OF TRAVEL
This may seem trivial, but the direction of travel impacts the quality also. Plates coming towards the cam seem to blur more that plates going away from the cam especially during dusk and dawn. Of course, this could just be that the plates coming towards the cam are front plates and are not illuminated.

OTHER
Obviously you need to have very different cam exposure settings for day and night. Every cam location is different and what works for one, may not work for another. I started with the values listed by @bigredfish and @wittaj and adjusted from there. I was surprised how little tweaking I need to do to get good, consistent caps. Dusk and dawn are particularly more difficult.
Dusk good E.JPG Dusk blurry W.JPG Dusk good W.JPG

I set my cams to go to night about 50 minutes before dark and keep it in night mode 50 minutes after it gets light in the morning. This stops any focusing issues that most folks have complained about.

Paper plates and other non-reflecting plates are hard to get at night. Sometimes I get them and sometimes I do not. Also, the police seem to have some kind of coating that does not allow for a cap at night.
Night police.jpg

Dirty and damaged plates can be hard to get. Another issue is items that block the plate, like hitch balls and bike racks.
bike rack.jpg

Some states have multiple lines on their plates. PR does not do well with those.
Missed U.JPG PR missed the 'U' on this plate.

Front plates are great! But even though Texas requires a front plate and the fine is $500, many do not. Like, what’s up with Audis? They almost NEVER have a front plate.
Audi.jpg

BLUE IRIS
Getting your trigger settings will be very important if you want to use a plate OCR service. With PR it is free for 2500 lookups per month but has other pricing such as $50/month for 50,000 lookups per month. A lookup is any image that is sent to PR, even if there is no plate in it. In my first four days of using PR, I had over 2000 lookups. That is about 500 lookups per day. For one day that I really worked the data on, of those 500 lookups only 281 returned a plate value. So about 44% were worthless alerts. Looking at those, it is apparent that I need to do better in using triggers. While I have gotten good input here, like about cloning the cam and using one clone for one direction and another clone for the other direction, I have not had the time to try it out. Another issue is non vehicles triggering the cam, like people, dogs, and golf carts. Probably will have to live with those.
dog.jpg

PLATE RECOGNIZER
There are issues that I have with PR. There is no way to correct plate numbers. There is no easy way to download your captures. I asked PR about that and they sent me some info on using WebHooks to do it. I have not programmed in scripts or anything else in over 10 years. PR does write the plate, camera, date, and time to BI’s log file, but pulling that out so far has been a big deal. I have already mentioned that it has a hard time differentiating certain letters and numbers. Also, sometimes it picks up my camera name or time/date as a plate. Or lettering on the side of a vehicle. PR also has a service called Stream which is $35/month per camera. It uses the camera's video stream rather than an alert snapshot. So this may negate the need to fine tune the trigger. They have a 30 day free trial for three cams, so maybe some day I will try it out.

DATABASE
I had thought I could build some kind of searchable database for all of the plate data I am collecting. Even something as simple as an Excel spreadsheet might suffice. But so far getting data from PR into that is a nightmare.

OTHER PLATE OCRs
A lot of members use OPENALPR and @Gymratz and @DLONG2 and others have written interfaces for the data in that service. But it seems that that service changes their formatting often which breaks things and causes those guys to figure it out and make updates. But it is not right to expect them to continue to support that effort with no compensation. I plan on trying it out some day. But I just do not have the time right now.

Maybe I will just do like @bigredfish and not worry about collecting the plate data and just know that if something happens, I can look back and probably get a plate.

Well I hope this helps anyone that is thinking of trying out LPR. Please feel free to make comments and suggestions.
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
1,082
Reaction score
932
Location
USA
Nice job!

There are always some tweaks you can do to further eliminate the false triggers.

And more zoom can help improve the accuracy of Plate Recognizer.

Zoom is something I seem to tinker with the most on my LPR - I ran a tight zoom for a long time and got great large clean plates, but once I started running Plate Recognizer, I noticed that some trucks and other vehicles would have their plate higher than a normal vehicle and I was missing those. And if my neighbor's car wasn't parked out on the street, cars traveling in the path where a parked car would be would also be missed. So I have zoomed out some to catch every vehicle regardless of plate height or if my neighbors car is parked on the street, but that came at a cost of Plate Recognizer not reading every plate accurately. So I tinker some more LOL. It is a balancing act. And of course my angle is different than yours too.
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
5,858
Reaction score
9,416
Location
Florida USA
My most recent project is to have a spotter camera tell a PTZ (which otherwise provides overview and Human tracking at the entrance to the neighborhood), to zoom to the intersection to catch a plate on an exiting car. Will post the PTZ review and samples this weekend.
 

LittleBrother

Pulling my weight
Joined
Sep 16, 2014
Messages
467
Reaction score
105
Very nice. I just ordered a PTZ to serve this purpose, but if it doesn't end up satisfying the need I'll use it elsewhere and consider the dahua you have. In my case the cars would all be pretty close, at very low speed, and direct on to the camera (I live at the end of a turnaround). In my case I plan on a fully zoomed preset where the plates come, then when I get bored I can just use the ptz to look around the house. That's the plan anyway. I imagine your camera would be better for the purpose in truth.
 

brianegge

Getting the hang of it
Joined
Apr 27, 2020
Messages
56
Reaction score
52
Location
Ridgefield, CT
In my system I first process the feed with an object detector. If it sees a vehicle, it crops the image and passes it to the sighthound api. It removes the problem of false alerts due to other movements.
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
1,082
Reaction score
932
Location
USA
The biggest problem I have with a PTZ at night is you cannot set a manual focus like you can the Z12 cam we all use for LPR, so you need enough ambient light and slower shutter so that it can focus when it is called over by a preset.

Although much to my surprise, I have picked up some plates with autotrack on tracking a car at night going 30mph with a 1/60 shutter in COLOR - I have found the autotrack can "hold" the plate and with the camera moving with the plate, a slower shutter can work. I wouldn't count on it as a primary source of LPR, but I was surprised to see this.
 
Last edited:

samplenhold

Known around here
Joined
Aug 8, 2018
Messages
1,904
Reaction score
3,628
Location
Spring, Texas
It is a balancing act
Exactly. I was zoomed in closer for a while, but I had issues with getting high mounted plates or the whole car took up the alert and no plate in frame. So I have decided to be at these settings. Will get back to getting better triggers later.

In my case the cars would all be pretty close, at very low speed, and direct on to the camera
That is the best possible location. That is great.
 

Sphinxicus

Getting the hang of it
Joined
Aug 30, 2017
Messages
24
Reaction score
32
Location
Ireland
Thats a great write-up @samplenhold and perfect timing as I have started the research journey for adding a LPR camera.

You have a lovely house. When i started reading your post, I was scouring the photos of your house trying to spot the Z12 to see if it sticks out like a sore thumb (i dont want my house to look too much like a bank bristling with obvious cameras). In the end i gave up looking for it. It was only then when i read further down your post and you mention the box they sit in :rofl: One off topic question if you dont mind? What are the white boards above parts of your guttering for? Are they to stop a deluge of rain coming down the gully of the roof splashing over the top of the gutter?

You have got some great results. The work that you and others have put into this section of the forum is a game changer for people (like me) getting started on this artform of LPR capture. I thank you. :thumb:
 

biggen

Getting comfortable
Joined
May 6, 2018
Messages
815
Reaction score
790
Good write up!

Im also in the boat if not using any kind of recognition system for plate capturing. I mean, there isn’t much point without also doing home automation tasks (gate opening etc...). If something happens, just go review the footage.
 

samplenhold

Known around here
Joined
Aug 8, 2018
Messages
1,904
Reaction score
3,628
Location
Spring, Texas
Are they to stop a deluge of rain coming down the gully of the roof splashing over the top of the gutter?
Yes. and thank you for the kind words.

If something happens, just go review the footage
The reason would be to see if a certain plate 'cased' the neighborhood, and if it was during the day, maybe get a better picture of the car and occupants.

I spent some time compiling one full day of plates that passed the cams. That included getting plates for the alerts that did not return a plate and getting them for cars that did not trip an alert at all. Just when you think you have the detection perfect, a few cars go by and no trigger. That was 386 plates. Of course, some of those were cars that were picked up by both cams as they passed in front of the house, but I was surprised by the number of cars that go back and forth, that seem to be just driving around. Like there is this one Mustang that comes and goes and drives through the intersection three times after dark. It is also interesting how many times a police car passes in a day and at what times those are.
 
Last edited:

Gymratz

Getting the hang of it
Joined
Jun 24, 2017
Messages
96
Reaction score
93
Good write up!

Im also in the boat if not using any kind of recognition system for plate capturing. I mean, there isn’t much point without also doing home automation tasks (gate opening etc...). If something happens, just go review the footage.
My primary cameras are to cover my house - they get other houses, but I'm not going to trigger alerts, etc.
When there is a theft in the neighborhood, the first thing I do is look at the LPs that passed that night. Sort by the ones seen the fewest number of times. I then have the exact time to review the cameras to look for shadowy suspects 4 houses down. Not close enough to identify a person by any means - but easily can show the people get out of the car, walk to the other cars, break in, back to theirs, drive off. I have that video + the LP to hand over to the police.

Could be found without LPR, sure. But having to review multiple cameras for an ~8hr period takes a lot longer.
 

Gymratz

Getting the hang of it
Joined
Jun 24, 2017
Messages
96
Reaction score
93
OTHER PLATE OCRs
A lot of members use OPENALPR and @Gymratz and @DLONG2 and others have written interfaces for the data in that service. But it seems that that service changes their formatting often which breaks things and causes those guys to figure it out and make updates. But it is not right to expect them to continue to support that effort with no compensation. I plan on trying it out some day. But I just do not have the time right now.
For what it's worth, I think there have only been breaking changes two or three times in 18 months.
You are correct though, the time could come that a change is made that either can't be fixed (e.g. they prevent the CSV downloads) or don't have time to fix.
Good news - if you do want to try it out, I believe the full install and config only takes ~2 hours if you follow the slick instructions that @tech101 put together. I recall him stress testing the instructions on a brand new setup recently which went well (and helped improve the document too).
 

tech101

Getting comfortable
Joined
Mar 30, 2015
Messages
770
Reaction score
804
Location
SF BayArea
Agree with @Gymratz . Personally me I do not think there is any solution like what @Gymratz @DLONG2 has made for us. This solution is just simply Amazing there is nothing even comes close to the things it does. Thank you to these developers for taking the time to put this together.

Now the instructions should not take more than 2 hours. And if you have some what good computer know how.. should not be more than an hour or even less probably after all the fixes from the past @Gymratz has already addressed so it has already cut down on lot of steps. :)
 

samplenhold

Known around here
Joined
Aug 8, 2018
Messages
1,904
Reaction score
3,628
Location
Spring, Texas
Good news - if you do want to try it out, I believe the full install and config only takes ~2 hours if you follow the slick instructions that @tech101 put together. I recall him stress testing the instructions on a brand new setup recently which went well (and helped improve the document too).
I will give it a try in the future, when I get back. Thanks.
 

biggen

Getting comfortable
Joined
May 6, 2018
Messages
815
Reaction score
790
My primary cameras are to cover my house - they get other houses, but I'm not going to trigger alerts, etc.
When there is a theft in the neighborhood, the first thing I do is look at the LPs that passed that night. Sort by the ones seen the fewest number of times. I then have the exact time to review the cameras to look for shadowy suspects 4 houses down. Not close enough to identify a person by any means - but easily can show the people get out of the car, walk to the other cars, break in, back to theirs, drive off. I have that video + the LP to hand over to the police.

Could be found without LPR, sure. But having to review multiple cameras for an ~8hr period takes a lot longer.
Yup, this is very similar of how I use IVS. I have the cameras save snapshots of all vehicles/people moving in front of the house between 9pm - 4am to a SAMBA share. Then I just review all the snapshots in the morning while having breakfast from my laptop that connects to the SAMBA share. Takes 1 minute tops to click through the ~60ish snapshots I get every night. If I see something suspicious happening in front of the house, then I check the footage. Snapshots save for 30 days and then they get erased to make room for new ones.

I live at the the main entrance of the neighborhood where I don't any malicious action on my property. Thieves prefer to go to the back of the neighborhood to break into cars where traffic/people are less. But what normally happens is that someone will post to Nextdoor or our neighborhood facebook page with a grainy Nest/Ring camera shot of a cheap white Honda Civic (or some similar car from the early 2000s) that the criminals used to drive themselves around in breaking in cars along the way. I hit the snapshot server to see what time it passed in front of my house and then pull up the LPR camera to get the plate. Unfortunately in our neighborhood, there is more than one exit/entry so its possible the criminals never even passed me by.

I'd like to some point add some plate recognition just as an additional layer but as @samplenhold is finding out, its no easy tasks and requires quite a bit of maintenance to keep it up and running. I'll keep an eye on this thread and see how he attacks it.
 
Last edited:
Top