LPR Case Study: Scoping, Planning, Proof of Concept, Installation, & Results

Joined
Aug 8, 2018
Messages
7,386
Reaction score
25,889
Location
Spring, Texas
Introduction

This thread is about my journey into LPR (License Plate Recognition) after having about 18 months of experience with IP cams and having quite a bit of my system finished. I am not an expert on LPR, or IP cameras either. But I have spent a lot of time working with my system and interacting on IPCAMTALK.

Some things to realize as you read this. I am retired so I have time to not rush the work and I do it all myself. This took almost a year from inception to working cams. Part of the reason is that both my wife and I had some medical issues and both had surgeries during this timeframe. The other is that I wanted to take my time and get it right the first time. My wife supports me and does not question what I am doing to the outside of the house. I also do not want the HOA getting into my business so I try not to make cams very obvious from the street. Wiring is hidden as much as possible. Most outside work is done weekdays during the work day. All cameras are Dahua and were purchased from Andy ( @EMPIRETECANDY ), as all of my cams have been. I use Blue Iris for my VMS. I record continuous and also use motion alerts.

There have been a lot of questions about LPR in threads for quite some time. Many newbies want to jump right in with LPR from the beginning thinking it is an easy feat. They do not realize that without some experience with IP cams, running an LPR setup is not simple or easy. There are lots of things to consider. See my thread below on that topic.


Scoping

I began considering LPR at the end of 2019. 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 (Front Street) and the vertical of the ‘T’ running NW/SE alongside of my house (Side Road).
1.JPG2.jpg3.JPG
I was hoping to get as many plates as possible, but I realize that getting 100% will never happen. 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 Front Street to the SW. This also gives me two chances to catch a plate for most cars. I named the cams LPR-E (looking NE at the intersection) and LPR-W (looking SW down Front Street).

Picking a camera was fairly easy. Most folks here had been using, with great results, the Dahua HFW5231E-Z12E, and more recently the newer HFW5241E-Z12E for LPR. The 5-60mm lens would be more than enough for the distances I was considering and the cost was reasonable.
4.JPG
So where could I place cams? I spent a LOT of time on the front porch, driveway, front and side yards observing cars and thinking about cam placement, angles, distance, and how to get Ethernet to the locations. I took pictures with my iPhone/iPad and Nikon DSLR of the house, streets, and from potential camera locations. I also used the IPVM Camera Calculator and Google Maps to calculate angles and distances for potential cam locations. I considered placing cams on the soffits, the corners of the porch and garage, in the garden and even on the trees. I looked at all of the LPR threads here to see what others have done.

Planning

So short of placing the cams on a pole up against the street (we don’t have individual mailboxes to hide a cam in), the best place to cut down on the angle was the part of the garden closest to the street. There is a pine tree there and if I placed the cams behind the tree it would not scream ‘CAMERAS HERE’! I considered placing them on a pole behind the tree, but thought still too obvious. I then thought of a box to house them in, painted the same color as the shutters on the house, might hide them the best. 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 pictures looked promising, at least from an angle point of view.
5.JPG6.JPG7.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’. So on this design, the only plates I will not get are if the vehicle does not have a front plate and they make the turn onto Side Road.
8.JPG
To get Ethernet to that location would take a lot of work. My IT closet is on the second floor in a bedroom closet and all of my outdoor runs so far went from that closet up into the attic to a patch panel I installed and then to the cams. However, there is no direct, easy way to get cables from the attic to the garden. While I had run cat5e from the attic over the second floor to the attic area over the garage (there is an access door from a bedroom to the area over the garage), getting cables from that space to the porch ceiling and then to the garden would not be easy either.
9.JPG10.JPG11.JPG12.JPG13.JPG
So I planned backwards. Starting with the box in the garden I could trench to one of the columns at the front of the porch. From there I could go in through a weep hole and then up the column into the beam that runs across the porch towards the driveway. Then make the turn into the beam that runs back towards the garage. Knocking on the wood columns and the hardiplank siding of the beams implied they were hollow. They are also fairly wide, much wider than any solid wood beam that would be used.
14.JPG15.JPG

But the porch beam does not overlap the garage attic area. How to get from the attic to the beam? I did some exploring with an endoscope and a GoPro on the end of a selfie stick to see if I could get behind the brick veneer. That did not look promising. I had a fall back plan though. I could use a short length of flexible conduit to come out of the garage attic soffit and go into the porch beam. That would be 18-24” tops. From there getting to the attic and down to the POE switches would not be hard. I now had a plan!
16.JPG

Proof of Concept

So I bought one Dahua HFW5241E-Z12E. I figured if it did not work out, someone here on IPCAMTALK would buy it from me at a small discount. 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.
17.jpg18.JPG19.jpg20.JPG

I posted the thread below to get some input and everything was positive.


So I was encouraged and bought the second cam. That was in April of 2020. So 5-6 months have gone by and now the installation starts!

To be continued...
 
Joined
Aug 8, 2018
Messages
7,386
Reaction score
25,889
Location
Spring, Texas
Part 2
Installation

Building the box and mounting the cams


Since the cams would be outside in the elements, I decided to use Dahua PFA121 mounting boxes to keep things water tight. So I mounted the cams to those boxes and mocked up a cardboard box to get measurements from. Because of the angles that the cams needed to be placed to get the desired views, the box ended up being bigger than I imagined. I got some cable glands to make the cat5e passage into the PFA121 watertight. I had to drill a hole in each box for the cable glands.
21.JPG

Since I wanted the wooden box to more or less match the brown wooden columns and shutters, which are rough wood, I got some 1x6” pine barn wood shiplap from Home Depot. I used 2x2” pine for the frame and 2x2” pressure treated for the legs that would go into the ground. Cut some holes in the bottom to allow water to drain and cut two small holes at the top to allow air to circulate. Those holes were covered with screen to keep insects out. All wood surfaces were primed and painted. I had made some wood furniture many years ago and making the box was fun and I do like the smell of fresh cut wood/sawdust in the morning!
22.JPG23.JPG24.JPG25.JPG26.JPG27.JPG

I used a garden auger on a power drill to dig the holes in the garden for the legs. Once the final position was determined, the unit was leveled and the two holes for the cams were cut. The legs were cemented in the ground.
28.JPG

Running the Cat5e

Since I was going to be running the two cables for the LPR cams, I thought why not install a few more cams on the porch. I had always wanted a cam pointed back at the front door from one of the columns and another one covering the whole length of the porch. So I did some testing and picked the two cams and their locations. But that is another story. So that is now four cables to run.

But in June 2020, one of my neighbors had his pickup tailgate stolen off his truck right in his driveway. They asked me if I had any video, which I did, but it was not good enough to give any real help as those cams are only focused on my property. In the dark with existing street lighting, I could tell he had a pickup and it looked like it was dark blue, but that was about it. This got me to thinking that, at night, the LPR cams will not get any info on make, model, color, occupants, etc. So I decided to put a cam focused on the intersection that would provide that info. That’s now five cat5e cables to run.

As per @sebastiantombs Rule #1 – Cameras multiply like rabbits.

I was going to have to punch a second conduit from the attic space over the garage to the upper attic where the patch panel that connects to the IT closet is located. Why? Because in my infinite wisdom while running the cables for the driveway cams, I thought there was no way I would ever need more than one additional cable to that area. So I used a ½” conduit and put a single pull string in when I ran the two cables for the driveway cams and the one for the POE switch in the garage. It is about 60 feet from the attic patch panel to the attic area over the garage. Then another 80 feet from that spot to the LPR cams in the garden and the intersection cam. That would be 140 foot lengths having to run from the main attic, through the conduit to the garage attic, and then out into the beams. That’s a lot of cable to cut in advance, not to mention the other two cams, which would have to be kept from tangling and kinking. So I decided to place another patch panel in the attic space over the garage and then run from there. This simplified things and I was able to do that in the spring before it got very hot in the attic. I finished this up around the end of May.
29.JPG30.JPG

Prior to cutting the cam holes in the box and permanently cementing the box into the ground, I planted it in its expected final position and put a remote digital thermometer in there. It transmits the temperature and relative humidity to a display unit in my office. After all, this is Houston, the box is dark brown, and will be in direct sunlight more than half the day in summer. Just how hot does it get in there? Will the cams be able to take it? The Operating Conditions listed in the datasheet state “-22F to +140F” and “Less than 95% RH”. Well I am not worried about the -22F, but the +140F? Well all summer long the hottest it got in that box was +118F and the highest RH was 92%. So I think I am good here.
31.JPG

The next set of work entailed getting detailed views of inside the beams and column that the Cat5e will be run through. How will I be able to run that cable all the way from the garage to the end of the run? So I used the endoscope and GoPro on the end of a selfie stick again to see inside these spaces.
32.JPG

I had to remove some of the baseboard at the wood/brick transition on the column and cut access behind that for the scope. There is also a small hole in the side of the column, thank you Woody Woodpecker. This ‘scoping’ showed that the column was indeed hollow and allowed me to see how it was framed. Yes I could get from the weep hole all the way to the top.
33.JPG

The only way to ‘see’ inside of the porch beams was to cut holes in the hardiplank. So I got some dual-gang low voltage mounting brackets and blank wall plates in a color as close to the siding color as possible. Also, I only cut the holes where they would not be visible from outside the porch. The dual-gang size allowed me to get the GoPro on a selfie stick inside the beam, as well as my hand and most of my arm, almost up to the elbow. Since it was now summer in Houston, I took my time on this through July into August.
34.JPG35.JPG36.JPG

To be continued...
 
Last edited:
Joined
Aug 8, 2018
Messages
7,386
Reaction score
25,889
Location
Spring, Texas
Part 3

Running the Cat5e continued

I measured the distance to each of the five camera locations to the patch panel in the attic over the garage. I did this three times, on three separate days, to make sure I did not smurf this up. Then I added ten more feet. I cut those lengths and labeled them with the camera name on each end.

Finally after exhausting all possible ideas on how to get from the garage attic to the porch beams, it was obvious that I would have to go to my backup plan of using a short piece of flexible conduit. Bummer. This required me to remove the downspout from the gutter before running the flexible conduit. The ‘flexible’ conduit was not very flexible as it was a cool morning. So I set it in the sun while I did other work. Threaded the five wires and a pull string out the soffit and though the conduit then into the bottom of the beam. Since there were five cables going through this conduit, I used some wire pulling gel to make it easier to pull the cables. Then I had to get the conduit into the two holes I had drilled into the soffit and the beam. Then reinstalled the downspout to the gutter. I think it actually came out quite well. It is not as big an eyesore as I had imagined. You really don’t see it from the street. Maybe I will paint it the same color as the siding.
37.JPG

I used a sectional fiberglass fishing rod to snag a pull string from each access hole and pulled the respective wires through the beams.

I started running the wiring through the porch on October 2nd. I figured it would take about 4 hours just to get all five of the wires to the end of their runs inside the beams, but not down the column to the LPR box, which I would do the next day. My plan was to wire up the three cams on the porch first and then tackle the LPR cams. Well of course it took all day (started at 8am and knocked off at 7pm) just to get the wires out of the garage, into the beams, and install one porch cam. Realize that all that wire, five separate with lengths up to 80 feet, get tangled very easily. And you do not want them to get kinked. So you spend a LOT of time going up and down the ladder, messing with the cables. In the next couple of days I installed the other two cams on the porch.
38.JPG39.JPG40.JPG

Due to life getting in the way, it wasn’t until October 25th that I got to do the install of the LPR cables. Had to enlarge the weep hole to get the conduit (1/2”) to fit in the hole. Dug the trench to the box. Lots of roots in that garden. I fed the wires and a pull string through each section of conduit as I glued them together. Once the wires were in the box, I trimmed them to a reasonable length (keeping enough for re-terminating if needed), fed them into their respective mounting boxes and terminated them. Even though the cat5e would never be exposed to the sun and it would be in conduit underground, I still used direct burial rated cable, which is gel filled. Royal pain in the ass to terminate. One needs to clean the gel off the individual wires prior to terminating them using an appropriate cleaner. I used LPS D’GEL. I also used the supplied watertight connectors and used some dielectric grease on the RJ45.
41.JPG

To be continued...
 
Last edited:
Joined
Aug 8, 2018
Messages
7,386
Reaction score
25,889
Location
Spring, Texas
Part 4

Results

Now that all of the wiring was complete, it took a couple of days to get both cams positioned and the proper zoom/FOV set. The LPR-E cam is set at 52mm and the LPR-W cam is set at 45mm. Day shots were great. It took another day or two to get the night shots the way I wanted them. Thanks to @bigredfish and @wittaj for their posts on settings for night LPR. Using those got me close and it just took some small adjustments to get the settings perfect. So below are some stills of captures from both cameras day and night.
42.jpg43.jpg44.jpg45.jpg46.jpg47.jpg48.jpg49.jpg

Intersection Camera

As stated earlier, I opted to install a camera overlooking the intersection for the purpose of getting information on the vehicle’s make, model, color, markings, and possibly any occupants that the LPR cams cannot get, especially at night. I opted for the B5442E-Z4E which is a 4MP bullet on a 1/1.8” sensor. It is an 8-32mm varifocal that I keep in color all night and is set at 26mm. Every vehicle that ends up on one of the LPR cams has to drive through the intersection, unless they are picked up headed NE on the LPR-W cam and then they reverse or turn around before they get to the intersection. There is enough light on that corner to get most vehicle’s information, except for those traveling NE very fast, then they will blur. Here are some shots that are examples of the information that this camera provides. Most of these examples are at night and one in rain at night. The Intersection cam does help out the LPR-E cam when paper tags are present. A single snapshot can never give you all of the information on the vehicle at night, so a lot of the observational information comes from watching the video and moving frame by frame in BI. This is especially so with the paper tag captures. It can take several frames to get the whole tag as some numbers are in focus in one frame but others are out of focus, then as you move through more frames, others come into and out of focus.
50.JPG51.JPG52.JPG53.JPG54.JPG55.JPG56.JPG

Plate Capture and Storage

I am still kicking around the idea of storing the plates in a searchable format. I had tried out Plate Recognizer (PR) since it was so easy to get Blue Iris (BI) to work with it. BI sends the alert image to PR and if PR identifies what it believes to be a plate, it returns the date, time, camera name, plate number, and a confidence value to the BI log file. They give you 2500 lookups per month for free. A lookup is when BI sends an alert snapshot to PR, even if no plate is found. No per camera limit. No number of plates limit for a specific snapshot. If you need more lookups per month, they have a 50K for $50 plan. It has also been reported if you contact them, they are willing to do a custom plan like 10k for $10 or 20k for $20.

So I tried it out in November and December. An analysis of the PR data for December (6 days, 23-28, used up my 2500 lookups for the month) shows that I really need to work on the detection of vehicles as I get more lookups that do not return a tag than ones that do return a tag, which I will call a ‘bad lookup’. This can be due to many reasons, such as the timing of the snapshot such that the tag is not in the snapshot, pedestrians and golf carts triggering the alert, no front plate, and other motion triggering the alert. I also get a lot of ‘bad tags’ returned, which are values that are not tags. These can be things like 0000 being returned for the Audi symbol when the car has no front tag, phone numbers and other writing on the side of vehicles, and the date/time stamp on the snapshot being returned as a tag. Another issue is when the vehicle does not trigger an alert at all. I see this happen mostly at night for fast moving cars. PR does a good job of correctly identifying the tags though. In those six days of captures, very few real tags came back incorrect.

Several folks on IPCAMTALK have given lots of good possible solutions to try, but I have not spent a lot of time on that. PR does have another app called Stream which uses the live video feed to pull plates from, which would solve the snapshot timing issue. It is more expensive though at $35 per camera but unlimited tags returned. There is no way to download the tags from PR. I have contacted PR and they told me to use Webhooks, but after doing some reading on that, I really do not know how to get that to work.

@DLONG2 has written an app to parse and store the PR records from the BI logs! It works quite well and copies the date, time, camera name, plate number, and confidence value to the Windows clipboard. From there it is easy to get it into Excel. @tech101 helped me to get that running on my machine as I know nothing about Visual Basic. That is how I analyzed the December data from PR.
57.JPG58.JPG

I have yet to investigate OPENALPR, and @Gymratz and @DLONG2 have made great strides in automating pulling the data and making a searchable database. Again, I have not had the time to work this. It is my understanding that it is only $5 per cam per month.

Next Steps

So as I write this there are still some things left to do. One is to put some rubber foam weather-strip around the camera openings in the box to stop insects from entering. Another is to decide how to secure the box cover in place but still have easy access. Probably will just use screws on opposing corners, two will do. I have yet to update the firmware to take advantage of the option to manually set the focus so that it does not get out of focus at night. But since I have only had that happen three times in two months, I am not in a great rush to do it. I also need to try out the Sunrise/Sunset utility.


Well I hope you found this helpful, or at least interesting. Please feel free to comment and give feedback. I am sure that many folks would have done things differently. I have learned quite a lot in this process. My intention is to show what was done and the thought process to get to the desired outcome. Planning and testing are essential to a successful LPR installation.
 
Last edited:

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
great info! good work! tho your ID for the white mini-cooper looks more like a LandRover Evoq to me... :)
 
Joined
Aug 8, 2018
Messages
7,386
Reaction score
25,889
Location
Spring, Texas
tho your ID for the white mini-cooper looks more like a LandRover Evoq to me
I did not work it hard...you are probably right. That is one of the problems with those little bastards that fly by there at night! But I got the tag!

edit, it just came by tonight from the other direction and it is a Range Rover.
1609548683956.png
 
Last edited:

Alex-1691

n3wb
Joined
Jun 16, 2019
Messages
1
Reaction score
0
Location
buenos aires
Excellent Job @samplenhold
We were working with PR and we had good results, In our experience, we recommend work with the camera in black and white.
With PR it´s necessary to know about programming, you used CLOUD API or SDK ??
Thanks for your reply
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
Planning and testing are essential to a successful LPR installation.
Thanks for posting this! It inspired me to move my LPR camera from a birdhouse, which was mounted in a tree, to a more stable location. The birdhouse was good for disguising the camera, but mounting it in a tree was not such a good idea. Whenever the wind blew the camera would move significantly and make the captures unreadable. I mounted the camera inside an 8" plastic pipe which I planted in the ground. The pipe sticks up out of the ground about 3' but isn't really that noticeable by passing cars.

IMG_2341.png

With the camera at about a 15° angle to the street it gets some great license plate captures.

Screen Shot 2022-07-25 at 4.08.43 PM.png
 
Last edited:
Top