DSPRelated.com
Forums

Speed estimation using computer vision

Started by NightHawk January 31, 2006
As a posible thesis project, I want do develop a system for estimating the
speed of a moving car on the street. The system would be based on camaras
so licence plates can be recorded if necesary. How would you develop such
a system, it needs to be reliable and as unexpensibe as posible...

NightHawk wrote:
> As a posible thesis project, I want do develop a system for estimating the > speed of a moving car on the street. The system would be based on camaras > so licence plates can be recorded if necesary. How would you develop such > a system, it needs to be reliable and as unexpensibe as posible...
Unmangled license plates are a standard size. The apparent size in the camera should tell you the distance, and the rate at which it changes, the speed. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
NightHawk wrote:
> As a posible thesis project, I want do develop a system for estimating the > speed of a moving car on the street. The system would be based on camaras > so licence plates can be recorded if necesary. How would you develop such > a system, it needs to be reliable and as unexpensibe as posible...
You say this is a "possible" thesis project. Does that mean you have not committed to it yet? Have anybody handed you any alternative strategies to implement, or is finding such strategies partof the thesis? What speed estimation strategy do you have in mind? Active? Passive? An active system is pretty straight-forward. Use a radar or a laser to measure the speed, snap a photo if the car's speed is above the local speed limit. Those kinds of systems have been available for decades, so I believe you are going for passive. A passive system isn't straight-forward to implement. I can't see how to do that without some sort of triangulation. If you choose, say, a stereoscopic model based on the depth vision in humans, you need to design some system that recognizes and tracks a car in the images from both systems. and you need to make sure the system matches the smae car in both images, and maybe track multiple cars simultaneously. Not necessarily cheap or simple. You could, of course, try to detect the shape of the car and map it as function of time, but then you need to correct for aspect changing aspect angle, possibly illumination, partially obscured line of sight and all sorts of other things. Doesn't seem to be the most robust method. What are the other thesis options you have? Rune
> >As a posible thesis project, I want do develop a system for estimating
the
>speed of a moving car on the street. The system would be based on
camaras
>so licence plates can be recorded if necesary. How would you develop
such
>a system, it needs to be reliable and as unexpensibe as posible... > >
WOW... simply an amazing idea.... im speachless. It hadent ocurred to me, thanks a lot. Any other sugestions or the like?
> >NightHawk wrote: >> As a posible thesis project, I want do develop a system for estimating
the
>> speed of a moving car on the street. The system would be based on
camaras
>> so licence plates can be recorded if necesary. How would you develop
such
>> a system, it needs to be reliable and as unexpensibe as posible... > >You say this is a "possible" thesis project. Does that mean you have >not committed to it yet? Have anybody handed you any alternative >strategies to implement, or is finding such strategies partof the >thesis? > >What speed estimation strategy do you have in mind? Active? Passive? >An active system is pretty straight-forward. Use a radar or a laser to >measure the speed, snap a photo if the car's speed is above the local >speed limit. Those kinds of systems have been available for decades, >so I believe you are going for passive. > >A passive system isn't straight-forward to implement. I can't see how >to >do that without some sort of triangulation. If you choose, say, a >stereoscopic model based on the depth vision in humans, you need to >design some system that recognizes and tracks a car in the images >from both systems. and you need to make sure the system matches >the smae car in both images, and maybe track multiple cars >simultaneously. Not necessarily cheap or simple. > >You could, of course, try to detect the shape of the car and map it >as function of time, but then you need to correct for aspect changing >aspect angle, possibly illumination, partially obscured line of sight >and all sorts of other things. Doesn't seem to be the most robust >method. > >What are the other thesis options you have? > >Rune > >
First question.... Im reaserching the problems of a passive, computer vision only aproch, where the only items required are a camara and a DSP or other processor. Idealy it would be passive, but as you say, its rather dificult to make a good implementation. I will try and make some estimations of the performance of a passive "camara only" system vs an active system, if the diference is too great, Ill go active. Second question. Well, I have 2 thesis options I like, the first one is the one Im asking about, and the other one is a little bit more complicated... let me elaborate. When you order a set of prescription sunglasses from most stores, the store simply takes a premade lens that can fit into the sunglasse's structure, and puts it in place. The premade lens is cut in the factory so that the focal point of the lens and the shape are as needed for the prescription... a way cheaper alternative is to buy the rectangular sheet form which the lens are cut, and manualy cut it, as it is done in some older eye clinics. My thesis would be an automatization of the calculation where to cut the the lens so that the focal point is where it needs to be, and the shape of the lens fits the metal structure of the sunglasses, and maybe the actual machine that perform the cutting. Ill post more details of this project later...
NightHawk wrote:
> > > >NightHawk wrote: > >> As a posible thesis project, I want do develop a system for estimating > the > >> speed of a moving car on the street. The system would be based on > camaras > >> so licence plates can be recorded if necesary. How would you develop > such > >> a system, it needs to be reliable and as unexpensibe as posible... > > > >You say this is a "possible" thesis project. Does that mean you have > >not committed to it yet? Have anybody handed you any alternative > >strategies to implement, or is finding such strategies partof the > >thesis? > > > >What speed estimation strategy do you have in mind? Active? Passive? > >An active system is pretty straight-forward. Use a radar or a laser to > >measure the speed, snap a photo if the car's speed is above the local > >speed limit. Those kinds of systems have been available for decades, > >so I believe you are going for passive. > > > >A passive system isn't straight-forward to implement. I can't see how > >to > >do that without some sort of triangulation. If you choose, say, a > >stereoscopic model based on the depth vision in humans, you need to > >design some system that recognizes and tracks a car in the images > >from both systems. and you need to make sure the system matches > >the smae car in both images, and maybe track multiple cars > >simultaneously. Not necessarily cheap or simple. > > > >You could, of course, try to detect the shape of the car and map it > >as function of time, but then you need to correct for aspect changing > >aspect angle, possibly illumination, partially obscured line of sight > >and all sorts of other things. Doesn't seem to be the most robust > >method. > > > >What are the other thesis options you have? > > > >Rune > > > > > > First question.... > Im reaserching the problems of a passive, computer vision only aproch, > where the only items required are a camara and a DSP or other processor. > Idealy it would be passive, but as you say, its rather dificult to make a > good implementation. I will try and make some estimations of the > performance of a passive "camara only" system vs an active system, if the > diference is too great, Ill go active.
The one scenario I can think of, where one camera can be used, is the surveillance cameras that are more and more popular in the big citys. These things are mounted high on lamp posts or walls, and have a bird's perspective on the street. If you can use one of those to detect when the car passes some reference points in the street, you can also detect its speed if the distance between the reference points is known. There would be two possible problems with that approach. The first would be that the resolution of these types of cameras might not be good enough to get the lisence number. The second is that the system only works in good light conditions. Even if the camera is good enough, it will probably not be able to get the lisence plate at a car that speeds in the dark. I am not sure if the law enforcers are very interested in a system that works only part of the time. The automated traffic surveilance systems I know of, are either active systems that bring their own flash for illumination, or they are passive but set up around well-lit areas, like toll boots or checkpoints.
> Second question. > > Well, I have 2 thesis options I like, the first one is the one Im asking > about, and the other one is a little bit more complicated... let me > elaborate. When you order a set of prescription sunglasses from most > stores, the store simply takes a premade lens that can fit into the > sunglasse's structure, and puts it in place. The premade lens is cut in > the factory so that the focal point of the lens and the shape are as > needed for the prescription... a way cheaper alternative is to buy the > rectangular sheet form which the lens are cut, and manualy cut it, as it > is done in some older eye clinics. My thesis would be an automatization of > the calculation where to cut the the lens so that the focal point is where > it needs to be, and the shape of the lens fits the metal structure of the > sunglasses, and maybe the actual machine that perform the cutting. Ill > post more details of this project later...
The engineering of this proposal is harder, that's true. Lots of hardware involved. But the long term economy is way different from the car surveillance system. First of all, the optician industry is large, and such a system would bring down cost associated with stocks of pre-cut glasses significantly. Second, being able to do these on-demand cuts fast and cheap, might generate new markets in, say, sunglass fashions. All in all, I wouldn't be surprised if there is a lot more $$ involved in the glass cutting. It's relatively easy (well, not impossible) to get funding from an industry if you can demonstrate that you can increase the profit margin. There is just about one funding source, the government, that is interested in surveillance cameras. You have to demonstrate that your system works at least as good as what is already in use, which is all but impossible. Partially because what you try to do is difficult and further improvement can be very hard to achieve, but at least as importantly because what is used today is classified, so you will never be able to compare the systems even if you were able to make improvements. Remember, there comes a day when you have submitted your thesis and want a job. Having simplified a production process and reduced costs for an industry, would look good on your CV. Rune
Jerry Avins wrote:
> NightHawk wrote: > > As a posible thesis project, I want do develop a system for estimating the > > speed of a moving car on the street. The system would be based on camaras > > so licence plates can be recorded if necesary. How would you develop such > > a system, it needs to be reliable and as unexpensibe as posible... > > Unmangled license plates are a standard size. The apparent size in the > camera should tell you the distance, and the rate at which it changes, > the speed.
Sure, you are right. The idea is simple. In fact, it is so deceptively simple that it worries me. So let's elaborate a little bit on the idea. Digital cameras have been around for how long... 30 years? 40? During that time, lots of people have tried to do stuff like this. Lots of very smart people. Knowing you and a couple of the other regulars here who were active in the 60ies, I think it is safe to say that this very idea ought to have occured to the first image processing engineers whithin two minutes after having read the project breaf. Finding a rectangular-shaped, even at an aspect angle, isn't the hardest task in image processing. I'm not saying it's easy, though, just not the hardest... The distance formulas have been known at least since the times of Fresnel. Neither the task nor the idea are flabberghastingly new. Both ought to have been around since the inception of digital image processing. So why are these systems not in use all over the place? Could it be that there are some inherent flaws in the idea that we have not considered? Could there be that there is some diabolic detail that kick the feet away under the idea? For some reason, I am sure the answer to both questions is "yes". No criticism of you. Just an example, absed on my recent rant, on what triggers me asking the impertinent questions and making me wear my "devil's advocate" robe. Rune
Hey NightHawk,

I'm not sure if you've looked into the current technologies, but I know
there are traffice cameras implemented in one of two ways (my hometown is
kind enough to install about 20 of them around the city). 

1.) Have a continuously running camera, with some sort of motion
detection. At the first sign of motion, the camera begins capture on a
specific part of the street. The camera takes 2-4 high speed photographs
in short intervals. There are additionally tick marks on the street so
that knowing the interval time and looking at how far the car has moved,
an operator can determine at some point in the future if the car was
speeding.

2.) There are two relatively short spaced ground triggers that detect when
a car has passed them in too short of a time (based on some threshold) and
then a similar camera system is set off. This system is also used to
detect people blowing through red lights.

I realize that neither of these current ways help you in your final goal,
but I thought they might help you in narrowing down the current
technologies, since they may be workarounds of not being able to do it
your way (for some reason, as mentioned above).

I've always wondered why those cameras do not use radar. There are those
unmanned radar displays they put on highways (such as near construction
zones) so I assume they can have continuous radar going. Perhaps use that
in conjunction with your image analysis? (I realize this may not be an
option)

Also, I hate traffic cameras.
Rune Allnor wrote:
> Jerry Avins wrote: > >>NightHawk wrote: >> >>>As a posible thesis project, I want do develop a system for estimating the >>>speed of a moving car on the street. The system would be based on camaras >>>so licence plates can be recorded if necesary. How would you develop such >>>a system, it needs to be reliable and as unexpensibe as posible... >> >>Unmangled license plates are a standard size. The apparent size in the >>camera should tell you the distance, and the rate at which it changes, >>the speed. > > > Sure, you are right. > > The idea is simple. In fact, it is so deceptively simple that it > worries me.
... Me too. I didn't point out potential difficulties because not knowing about them might lead to a fresh approach. Rolling two aluminum plates together to make foil is one example of why it's sometimes good not to believe that a thing can't be done. Solving the hidden-line problem by painting the scene in planes from back to front is another.* Sometimes "Just do it" works. Jerry _________________________ *Display specialists had for years looked in vain for a practical hidden-line algorithm. A non-specialist solved it for his own use. He was an engineer who had no idea that it was a hard problem. -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
NightHawk wrote:
> > As a posible thesis project, I want do develop a system for estimating the > speed of a moving car on the street. The system would be based on camaras > so licence plates can be recorded if necesary. How would you develop such > a system, it needs to be reliable and as unexpensibe as posible...
When doing your literature survey, be sure to include details of the SPECS system ( http://www.speedcheck.co.uk/ ), probably state of the art in passive systems. It relies on having two or more cameras sited at known distances along a road, and vehicle recognition to time vehicles between these points. To do it with a single camera with no external reference markers or triggers is tricky. In this case, the time is the known quantity (X frames per second), and you must use the camera to measure the distance that the car moves in a known time. With a single, fully calibrated, camera, you can transform each pixel into a "ray" passing out from the camera lens into the real world. The object being imaged by that pixel lies somewhere along that ray, but you can't tell where. If you take two time separated images of a car and locate the same point on the car in both images (say one corner of the licence plate) then you have two rays and you know the car moved from somewhere along the first ray to somewhere along the second one in the time between frames. However, this does not tell us the distance travelled by the car. We must supply additional information to deduce this. The most common way is to use a second camera in a stereo pair. In this case, you have a ray from each camera, and the intersection of the rays tells you the object position in the real world absolutely. To do it with a single camera requires some cunning and assumptions. One possibility that springs to mind is to try to locate the tyres. Since the bottom of the tyre is always in contact with the road (The Streets Of San Francisco excepted), you can intersect the ray with the ground plane and measure the distance along the ground. As an excercise, this might be interesting. As a solution to the problem, I can't see that it has any advantages over current active or SPECS-type cameras. Cheers mark-r -- "Let's meet the panel. You couldn't ask for four finer comedians - so that answers your next question..." -- Humphrey Lyttleton