Ask Your Question
1

Can OpenCV detect approaching object's speed?

asked 2016-10-11 13:08:28 -0600

waxi gravatar image

updated 2016-10-11 14:46:09 -0600

Hi guys,

My first question, please, bear with me. Before I start actual programming I would like to know if OpenCV is capable of detecting speed and distance of an approaching object (vehicle). I was reading a lot and all examples/projects are done in a way that camera is placed perpendicularly to the road.

Let me describe what I want to do: I want to mount Raspberry Pi with new 8MP Raspberry camera to the motorcycle facing backwards. Using OpenCV I would like to detect the speed and distance of approaching vehicle (usually car) while motorcycle is stationary waiting at the traffic light (this is important for OpenCV - background will be kind of static). If the car will be approaching with dangerously high speed motorcycle driver will be notified with a dash LED and bike's brake light will start to flash quickly. I am not sure yet how I'll implement that image will be analysed only at standstill (maybe G sensor...).

So, is OpenCV capable of detecting speed and distance of an approaching object?

Thank you for any help and suggestion,

Matej

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-10-11 19:27:39 -0600

Tetragramm gravatar image

Yes. No. And I don't think you understand the problem yet.

No, it is not possible for the setup you describe to give you the approaching car's speed, unless you know the size of the car or a part of that car.

Yes, it is possible for a program written with OpenCV to give you the cue you are looking for. But you need to have knowledge about the road, and about how people drive.

It will not be simple. THIS paper shows the general idea, though the specifics don't work for your case. You'll have to do a lot of research to understand the problem and make your solution work.

edit flag offensive delete link more

Comments

You're right... I am at the very begining. Thanks for the paper. What if I look for licence plate? It has known dimensions and it's attached on every car.

waxi gravatar imagewaxi ( 2016-10-12 01:49:09 -0600 )edit

It might work, but at least where I am, there are no front license plates. So the assumptions you make are going to have to be assumptions that are valid for you. How long are the lines on the road, how wide is the road, what size are the license plates, are people allowed to have license plate covers, ect.

So I'm afraid we can't help you with that. When you do get to the part about writing code, feel free to come back. That is something we can help with.

Tetragramm gravatar imageTetragramm ( 2016-10-12 07:52:15 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-11 13:08:28 -0600

Seen: 1,172 times

Last updated: Oct 11 '16