Dedicated License Plate Cam project

im going to mount the camera to a tiny post in the ground then i'll put the faux rock over top with a hole in the right spot and stake it down.. the hollow plastic rocks I am looking at are 18" tall so I am thinking the camera will be raised at least a foot above the rock bed.

at night the shutter speed is going to be so high the only thing this camera will see are headlights and license plates.. I am in a split level house with a pretty steep grade to my front yard, there is nearly a 5ft rise in elevation from the road to this rock, this camera will be merely ~2-3ft lower than my front door camera that's looking straight down a dead end road.. it gets headlights pointed dead on all the time and I havent seen any issues.. Ive setup my existing cameras to try to read plates for testing, and the configuration is so tuned for plate reading that at night its not really a usable image for anything else.. but it is tuned to look straight into really bright objects so I really doubt it'll be an issue. I suspect if I have issues with headlights it wont be due to the mounting height, it'll be getting enough IR onto the plate that its brighter than the headlamps.

I'll very openly admit I dont know wtf I am doing here, Ive never setup ALPR before at this point I am running a very expensive experiment.. I understand the theory all day long but in practice theories go to shit.. so dont expect me to start digging trenches and modifying plastic rocks until this thing has been just running off a tripod and loose wires for a trial run first.. I expect to hit some bumps in the road and thats why I am here just rambling on about it so the next poor bastard traveling this road will have some markers to follow.

Alot of people have been talking about doing this for a really long time now, but I have yet to see anyone really pull it off well.. I am hoping to end that.

attached is a view from my front door ptz of the faux rock location.. its looking straight out and you can see the rock garden is just a few feet below it, the camera hangs right over a retaining wall.. the living room there @ the window ledge is like half a level up from the entry with its split design.
 

Attachments

  • Screen Shot 2016-02-27 at 7.56.50 AM.png
    Screen Shot 2016-02-27 at 7.56.50 AM.png
    3.5 MB · Views: 124
  • IMAG0501.jpg
    IMAG0501.jpg
    2.1 MB · Views: 109
Last edited by a moderator:
  • Like
Reactions: anijet
a 50mm lens on a 1/3" 4MP imager gets you about 6 degrees FOV, or about 20 feet wide at 200 feet, for ~140ppf.
that sounds like it could work, but will be more like the rectangle I drew than your full frame...

you can play with all that here, btw: http://ipvm.com/calculator

Just don't take the numbers the IPVM tool spits out as accurate. Sweet tool but it can be WAY off on the real world FOV. I've got one 6mm cam mounted and the real world FOV is only accurate with the calculator if I put in 4mm as the lens size. That's a huge difference in viewed area. A generic cam with 1080P 1/3" sensor w/4mm lens has an accurate real world FOV when 3mm is plugged into their calculator. I'd verify the measurements with a real sample camera first and then use it to base coverage on. I haven't verified their math on PPF. It looks like an expert designed the tool's interface but a D+ high school intern did the FOV calculations. Either that or Hikvision had the boss' elementary school kid doing their lens measuring as these are both Hik cameras.

EDIT- looks at least in part that Hikvision has the elementary school kids doing their spec sheets and what I was seeing with my cameras was not an IPVM problem. I dug a bit deeper into Hikvision's published specs on more than a few of their popular cameras versus what somebody found when they yanked a camera apart and did some measuring. Hikvision is apparently incorrect when they state 1/3" sensor in their spec sheets which screws up FOV calculators. Looks like they're actually more like 1/2.5" sensors on cameras like the 2032, 3345, and probably a bunch of others in their 3 and 4 MP range which makes the IPVM calculator's FOV much closer to what I see on my screen through the actual cameras.
 
Last edited by a moderator:
  • Like
Reactions: nayr
I kinda suspected as much, I was running rough numbers through my head based upon what I was testing with my other dahua but its a 2MP 1/2.8 w/5.1mm-61.2mm, which is not a perfect comparison for a 4MP 1/3 w/6-60mm but was still giving me quite a bit wider FOV than IPVM was saying I'd get. my big black face dahua can just barely read plates at the distances im looking at and see both sidewalks in the frame.. was hoping if I doubled the MP it would take it from barely to easily.

Guess we'll see, thats why I think variable lens is pretty much going to be mandatory for a good ALPR camera.. I would really like to be able to get sidewalks too and not just the middle of the road.

playing with google maps it looks like that 200 was maximum range, i should still be able to get a really good angle from ~110ft-160ft away depending on coming or going, I have some flexibility with this location.
 
Last edited by a moderator:
I suspect if I have issues with headlights it wont be due to the mounting height, it'll be getting enough IR onto the plate that its brighter than the headlamps.

The secret to that one is not to compete with the headlights at all and that's where your offset and a little knowledge about how plates work to reflect light will help.

Plates are retro reflective. In short that means they are designed to reflect light back to the source and they will do that at angles beyond 45 degrees off centre but ideally your angle will be less than 45 degrees because that is the angle most plates are designed to be readable in.

From your pic it appears you may be attempting to grab the plate when it is almost perfectly perpendicular to the camera as the cars come around that corner. There are advantages to that as the plate is moving directly at the camera so you get less motion blur, but the headlights are also facing directly at the camera and you are attempting to pick up the reflection of a plate in the glare of a pair of 45w xenon headlights, or worse, the 100w high beams.

As a suggestion I would move your plate capture zone to the left of the tree in your shot and capture your plates after the cars round the bend slightly and the headlights are pointing up the road. The light from your illuminator is still going back to the camera but you aren't fighting the headlights of the car any more. The car is also closer to the plate which makes your illuminator more effective. The inverse square law means that every time you reduce the distance to 70% of what it was you double your available light. More light means higher shutter which means cleaner captures.

I capture at about 30 degrees and 15 - 20 metres (60 - 75 feet) runnning 1/1000 shutter and using an old dahua with woeful low light performance and a cheap illuminator. This is the result.

Night Plate Capture 1ms shutter.jpg
 
  • Like
Reactions: nayr
thank you its much appreciated, yeah am not really going to get the plate read head on was going to get it on the close side of the corner before or after they enter the left of the frame so the headlamps are not straight on.. with that being a bend the lights are only head on for a moment and it'd be silly to try to read it right then.

i really liked that viewpoint because it had a nice vantage further down the street, and it intersected the sidewalk at the end of a driveway where nobody should really park, but I am planning contingencies.. I have a fire hydrant in my front yard that nobody can park infront of either so I could put the LPR camera at the other end of the rock garden near the front door PTZ.. would be more of an offset angle like yours but im sure the camera I ordered can handle it if yours can

when the trees are in full bloom it'll be really hard to get a 30 degree angle on on traffic from the roof line, but from ground level with this faux rock plan I have so many avenues now I am pretty much guaranteed success, so I'll do quite a bit of experimentation.. so much that plan A is very unlikely to win the day :)
 
+1 on that angle thing. OpenALPR has a de-morphing feature that apparently can help recognition rate when capturing off-angle.
you train it how to pre-process the area where the plates will be captured to 'straighten' out the plate before it gets scanned...
Anyone used it and find it helpful? I need to put up a decent Linux box to run it, but I've got my cams all set up...
 
I capture at about 30 degrees and 15 - 20 metres (60 - 75 feet) runnning 1/1000 shutter and using an old dahua with woeful low light performance and a cheap illuminator. This is the result.

View attachment 8679


Nice clear shot....But what about day light?...Do you have to change settings substantially for day plate images?
I'd read elsewhere here of using BI to make preset changes for day & night...but absent something like BI or the desire to manually change settings, how can you get good shots both day and night?

Do most all cameras have shutter speed setting adjustments?
I was trying out a very basic setup for LPR with a standard fixed camera, (now realize that's not a good choice) but my (Qsee 3mp) camera did not appear to even offer a shutter speed adjustment, (or at least the included NVR did show it as an option), so I could only get plate captures during the day...

I was doing a mailbox cam, (w\ a false inside backing so as not to freak out the mail lady) to give me an almost perfect road shot as the road curves just ahead of the box.


Screenshot_2015-12-13-16-15-59.png
 
I just tuned it for best night-time shots. Daytime is no problem with the same settings,
but one can go even faster/higher on the exposure during the day for even clearer shots of the faster cars...

not familiar with the Q-See cams or their configurability, so i can't tell you how to adjust yours (or if it supports setting exposure limits).
That said, if it's a rebranded Dahua, it probably has a setting for max exposure somewhere...

I like the mailbox cam idea, but I think you'd want a narrower field of view (bigger zoom lens) if you intend
to automate the plate recognition (with somethin like OpenALPR). If you just want to be able to read plates
yourself from the recorded footage, you don;t need as many pixels per foot, but more is better!

I've marked off in green what i'd try to frame with your setup, if this were to be dedicated for grabbing plates.
25266067152_86bb3c739a_b.jpg

keep in mind that once you tweak it for grabbing plates at night, you pretty much don't see anything else at night.
that's why we talk about dedicating a camera to catch plates, and use another one with wider fov and less draconian settings
to have an overview of what's going on...
 
Thanks...Def need a narrower FOV from what I have been reading.
This was just an initial experiment...those cams went back to the store and still undecided on cameras \ NVR\ BI...still studying up on this and other sites.
OpenALPR sounds very interesting but complex to set up from initial reading as I'm not a programmer.

Also would still need a solution for an external IR that works well enough for night plate reads but dies not attract a lot of attention....A glowing red lights coming form a mailbox peep hole would freak out the neighbors.
Would want something external.

Was looking into the "invisible" light range IRs but most people say they do not work or do not work well enough.

Also no electric at the mailbox other than low voltage landscape lighting to tap into...Any idea if I could power IRs off of low voltage?




 
the reason I went with a Dahua camera was (among many things) because I already have code in place to switch my cameras from day/night mode externally from my Home Automation Server.. right now its set for 10mins before Sunrise and 10mins after Sunset based upon my geographic location and it seems to be working very well.. Having completely unique profiles for day night helps dramatically as far as functionality, but something has to know when to do it because cameras are too stupid for some reason.

I required this just so I could turn on my visible security lighting at night without having all my cameras kick back into color mode and loose the ability to see any distant objects.
 
Last edited by a moderator:
Nice clear shot....But what about day light?...Do you have to change settings substantially for day plate images?

No I leave all settings exactly as they are for daylight as well, including leaving the camera in black and white mode as I got unacceptable focus shift when the camera went to colour.

1/1000s is the minimum shutter speed. The dahua I am using allows a range so it isn't an issue. It is also auto iris so it can bump up the f number by day.
 
Last edited by a moderator:
I got the 25mm lens installed into my 2032 and right now have it pointed out the window to test. I am running the openalpr daemon on the main stream (1080p), but openalpr scales the image down to 1280x720. For some reason I am getting graphic artifacts in some of the images that are saved. Anyone have any ideas why this happens?

home-site-cam1-1457371064814.jpg

Originally I had the settings in the conf file use the nvidia GPU and thought that was causing the problem, but have switched to using CPU only and am still seeing occasional problems.
 
give it a 720p stream or change OpenALPR's configuration so it does not resize your 1080p... also lower your iFrame interval as low as you can.

tearing like that is usually a sign its running at a different framerate than the camera is providing, causes iframes to be missed and images to tear... likely because its running too slow and being forced to drop frames to keep up.
 
Nayr, thanks for the tips. I've changed the stream to 720p and also reduced the iFrame interval down to 1. Will watch it to see how it performs now. Any advice on how many FPS I should have the camera set to? Currently I'm using 15 fps.
 
Shutter speed is what you need to get nice crisp images of a plate, and you only need one good frame.. so your ideal FPS is likely going to be dependent on vehicle speeds and angle of attack.. so I would start off as low as possible 2-5fps and work your way up if you have problems with vehicles speeding by and not getting the plate.. i suspect 15FPS is far too much for ALPR unless your tracking interstate speeds.

but its just theory, im not exactly sure what ideal FPS is going to be.. the above method is how I plan to approach it.. no real point in shoving 60 frames at it when a car passes by if it gets the data it needs in the first couple... just play with it, for example if you get 5 accurate reads every time a car goes by you could probably divide your FPS by 5 and still get what you need quicker and without as much load... Once you get avg ~2 accurate reads on the fastest vehicles I would say you've found the sweet spot
 
Last edited by a moderator:
The speeds which I'm dealing with are pretty slow (25-30mph). I'll try turning down the frame rate. I have some examples images that have been captured, but openalpr is not able to detect the plate in the image. My focus may be off a bit and shooting through my window does not help clarity, but looking at the images the plates are pretty legible. Here is an example.

home-site-cam1-1457381737515.jpg
 
I lowered the frame rate down to 6fps, upped the shutter speed from 1/200 to 1/250 and increased the resolution to 1920x1080. With these settings I've been able to get 100% recognition on the two vehicles that have driven by. I believe I need the higher resolution due to not being zoomed in far enough and require the additional detail.

Now I need to find or write a Python script that will pull the JSON data off of the beanstalk queue so I can insert that data into a database.
 
  • Like
Reactions: nayr
sweet, yeah without enough zoom the extra pixels will come in handy.. with my 4MP and variable lens I should have alot of stuff to play with... because my camera was not in stock and they had to order it from dahua my AliExpress order got canceled automatically when it didnt ship within 7 days.. so more delays, argg