mem123
Posts: 18
Joined: Mon Mar 06, 2017 3:43 pm

Pi NOir Camera for license plates

Mon Mar 06, 2017 4:08 pm

Hello,
I would like to buy a camera that can read licence plates at night.
I am thinking to buy Pi NoIR.
What do you think for that? Is it true that the license plates captured by the camera are not clear at night?

If that's true what Raspberry Pi compatible camera do you recommend me?

Thank you for answering me. Your answers will help me enormously.

Wi8221
Posts: 1
Joined: Thu Mar 30, 2017 10:31 am

Re: Pi NOir Camera for license plates

Thu Mar 30, 2017 11:00 am

I'm looking on here for help on a similar subject, but I think what I've already found out can also help you.

The Pi NoIR camera will be able to see things in the dark IF you have some form of IR light source (also known as an illuminator), if you use IR LED's in the 950nm range then these will also be more discreet as they give out less visible light. They will not have a huge range, but you should be able to aim the camera and illuminator onto a single point that will give the best view of a passing vehicles licence plate.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7303
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi NOir Camera for license plates

Thu Mar 30, 2017 11:40 am

Wi8221 wrote:I'm looking on here for help on a similar subject, but I think what I've already found out can also help you.

The Pi NoIR camera will be able to see things in the dark IF you have some form of IR light source (also known as an illuminator), if you use IR LED's in the 950nm range then these will also be more discreet as they give out less visible light. They will not have a huge range, but you should be able to aim the camera and illuminator onto a single point that will give the best view of a passing vehicles licence plate.
Correct on the assumption you are in the UK or other country where number plates are required to be IR reflective (the exception being the silver/white characters on black background of pre 1973 vehicles).

By themselves neither Pi camera module can see anything at night - there has to be some illumination of a wavelength that is suitable for the camera. For the standard camera that means visible light. For the PiNoir that means either visible of IR light (there have been various discussions of which wavelength of IR illumination is better for the PiNoir, but I can't remember the answer off the top of my head.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
Gavinmc42
Posts: 3736
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi NOir Camera for license plates

Thu Mar 30, 2017 1:12 pm

850nm LEDs are better but you see the LED die glowing red/orange.
940nm are invisible to human eyes but the camera does not detect much light at that wavelength.

JBeale has found a way to strobe LEDs at frame rate, this gives a burst of bright light for a short time.
I know 880nm leds are around, not sure how well they work.

It also pays to shape the IR beam.
The camera lens is about 60 degrees field of view, 120 degree LEDs waste light the camera won't see.
10 degree LEDs act like a spot light.

In one Pi SPY book I have seen a telephoto lens added and a CDROM IR laser used as the light source, very long distance.
Watch out for laser blinding, think safety for these, use optics to spread and shape the beam.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
jbeale
Posts: 3494
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Pi NOir Camera for license plates

Sat Apr 01, 2017 3:04 am

Yes, it is possible, see below.

First, you need a good viewing angle between camera and car; probably less than 45 degrees (steeper angles become much more difficult). Unless you're a public utility you probably have to mount the camera some distance to the side of the road, meaning to get even 45 degrees you have to look some distance down the road. That means the normal moderately wide-angle lens on RPi Cam V1, and the wider lens on V2 are unsuitable in most cases to read plates.

The car in the picture below is about 35 meters away from the camera. No hope with the standard lens.
I used a 3rd-party V1-compatible NoIR camera board with M12 lens mount so I could attach a fairly long lens, with f=25 mm. http://www.ebay.com/itm/282167088666?_t ... EBIDX%3AIT
I have also seen a 3D-printable M12 lens holder on thingiverse.com designed for the V2 camera. http://www.thingiverse.com/thing:1963856

At night, you'll need to have your own illuminator. The most practical type would be an IR spotlight using 850nm LEDs. I got a very directional one, about 3 degrees wide beam, which is apparently no longer sold. You can make your own IR spotlight using an IR LED like http://www.ebay.com/itm/3W-Infrared-IR- ... 1935285549 and a large-ish lens eg. a "LED projector" type car headlight, like http://www.thingiverse.com/thing:1917482 If you put your head in the beam and look directly at it, it looks like a red Christmas tree light, but outside of the tight beam you don't see it at all.

In order to see the letters on a retro-reflective plate clearly, you have to set exposure (gain & shutter speed) so that the car and background is basically completely black. To see the actual car, you need to use another camera with much different exposure settings.

https://goo.gl/photos/aTPedALsnwNvZfNo9
Image

User avatar
Gavinmc42
Posts: 3736
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi NOir Camera for license plates

Sat Apr 01, 2017 5:27 am

JBeale,

Is that photo with just with one IRLED?

All plates are retroreflective? not sure if ours in OZ are, time to test.
Much better results than I expected, I only need 10meters.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
jbeale
Posts: 3494
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Pi NOir Camera for license plates

Sat Apr 01, 2017 6:43 pm

My camera is mounted on the house, looking off to the side down the road. At only 10 m distance, sounds like your camera is right up by the curb. There you might prefer a 8 mm lens like http://www.ebay.com/itm/3-6-6-8-12-16MM ... 2102971750

That particular photo was using a 3-LED illuminator, adjusted to tight beam. It is still listed but apparently no longer available:
https://www.aliexpress.com/item/CCTV-5- ... 78337.html

With that M12 25mm f/2.4 lens on the OV5647 sensor "NoIR" camera, and very tight focused spot from the LED aimed at the right place, yes you can get similar results with only one so-called "3W" 850nm IR LED which actually uses under 2 W electrical (about 1.67 V at 1.0 A). This works because retroreflective plates are pretty bright (assuming your illuminator is right next to the camera). But if you have to cover a larger area than 1 lane of a road, you might need more. Also, if your plates are not the reflective type.

User avatar
Gavinmc42
Posts: 3736
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi NOir Camera for license plates

Sun Apr 02, 2017 1:03 am

At only 10 m distance, sounds like your camera is right up by the curb.
Just over 1M from fence, aimed up the road, picture shrunk to save space, normally much better.
15meters of conduit to the camera post with a 12V diy POE.
Area of interest is about 10meters away in that shady spot.
Standard lens at the moment, not good enough for plates.
Yep, will need 8-9mm lens I estimate.

I got 16m more conduit for adding IR lights to those fence posts, about 3meters to the curb.
Was not looking forwards to digging them in, did my back recently renovating and I'm having to learn Tai Chi to recover :lol:
But if what you say about retro-reflective number plates then I might have to change that plan.
The IR Leds will need to be right next to the cameras.
That is one serious IR spotlight you have :P

Time to make a portable LED/camera system for testing.
Starting to get enough Zero's to use them now.
No point saving them for a rainy day, still recovering from the last one, just had TC Debbie come through.
Amazingly that camera in a diy case made from a $10 spotlight survived no trouble.
Small SPI LCD for viewer?

Car headlights for lens, never would have thought of that.
Attachments
pikcam2.png
pikcam2.png (47.88 KiB) Viewed 2630 times
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
jbeale
Posts: 3494
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Pi NOir Camera for license plates

Mon Apr 03, 2017 4:19 pm

If you want to spot someone lurking in your yard, you use a wide-angle light which needs lots of power to cover a big area. But if you want to see a reflective plate and you already know where it will be (in the road, we hope!) you can direct all your light into a very narrow beam and it doesn't take a lot. An IR power LED on a heatsink with a "condenser lens" of some appropriate size and focal length, is the right tool for that job. What's available on Ebay are lenses designed for a similar use, like for newer LED-type car headlights. When you put the LED right at the focus of the lens, the output is a projected image of the tiny light-emitting die inside. Try it inside, when the lens is in focus you see a little square of light on the wall, with a size depending on the focal length of the lens. Maybe not by eye, but most cellphone cameras see 850nm well enough to view a bright source like that.

For shorter distances like 10 m, you may be able to use the small snap-on collimator lenses with black barrel housing such as
http://www.ebay.com/itm/10pcs-5degree-l ... 2437621600
this gives you a very compact package, not much bigger around than the 20mm "star" type heatsink the LED mounts on. You can stack up as many as you need, probably in series electrically. You can buy these wired up and ready to go in a weather resistant housing like
http://www.ebay.com/itm/IR-Infrared-Ill ... 1897276429
but the catch is those are wider-angle lenses like 60 degrees, which spreads out your light pretty thin. But the lens + mount is somewhat standard in size, and you may be able to pry off the old lenses and substitute tighter-focus ones... I'm not sure and haven't tried that.

The strongest single-die LED I have found are so-called 3W LEDs (actually draws 1.7W at most). If you buy a 10W LED like http://www.ebay.com/itm/10W-High-Power- ... 1915184218 you will see it is made up of 9 separate dies and an external lens will project 9 separate spots. It gets smoother if you put the lens out of focus but then your beam gets much wider. The commercial "IR CANNON" I got used three separate lenses, one per LED so the far field beam was more-or-less uniform.

BTW, lasers are best for pencil-thin beams. They are not well suited for this task. They cost more per watt and are more fragile than LEDs with shorter lifetime, and even if you could guarantee some home-built beam expander wouldn't eventually fail in some eye-unsafe way, you still have "laser speckle" from the coherent light interference that makes plate recognition harder. Yes there are ways around that, but complexity increases a lot. Let's just say, been there and done that.

User avatar
Gavinmc42
Posts: 3736
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi NOir Camera for license plates

Tue Apr 04, 2017 3:54 am

Keep forgetting about LED lens.
Found these, suitable for the Osram Platinum Dragon LEDs I got.
http://au.rs-online.com/web/p/led-lenses/7106984/

Just found out there is a new version IR Dragon Dome SFH 4783 with built in 12 degree lens.
About time LED makers figured out the need for this. Ouch $12 OZ each.
Will get some 60 degree lens for normal NOIR camera use.
Last piece of the how to make puzzle sorted, now maker time.

Forgot about laser speckle, that's for some other time.
With a 12 degree LED plus extra optics, maybe a narrower LED beam could be easy now.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
jbeale
Posts: 3494
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Pi NOir Camera for license plates

Tue Apr 04, 2017 2:38 pm

I've tried various other things, including a larger array of 3W IR LEDs (this one wasn't for plates, quite a bit more than you should need for that.)

Image

jonnyb
Posts: 43
Joined: Thu Dec 06, 2018 10:43 am

Re: Pi NOir Camera for license plates

Sun Jul 07, 2019 3:28 pm

Hello
It really great to find this post as I’m also about to work on a similar venture.
I want to set up a Pi 3 or 4 with an appropriate camera to take pictures of vehicle number plates as they pass.
The distance from camera to vehicle will be approx 20m.
The questions I have are:
If there are street lights then in your opinions can I forget about the extra lighting or will lower light take its toll on the clarity?
Can these realistically be battery powered?
Any other suggestions on good cameras?
I appreciate any help..
Jon

Return to “Camera board”