Crude Speed Camera
-
So, the street on which I live on is a 50mph zone. However, the area is now a fully-developed residential area and because of such, should be re-classified as a 30mph zone (as defined by the UK Highway Code). Unfortunately, there are plenty of drivers who disregard the fact that the road is now built-up and drive often in excess of 50/60/70mph down the street.
Unfortunately, according to various sources (council, police force, etc), because vehicles are used to travelling so far in excess of 30mph that re-classifying the road down to 30mph is difficult (I have only 3rd party sources for this information, it may not be correct).
What I'm interested to do is to set up some kind of very crude speed camera system using a high-fps Sony camera module I obtained last year, together with a Linux computer of some description (probably something like a Toradex embedded SoM module to handle the high-fps of the camera). I'd also like to put some kind of motion-capture on the video feed to allow the video to be triggered when a car enters/exits the video window. The idea is that I would measure a distance across the road and given that I know the time at which the car crossed two points, I could work out rough speed.
Where I'd like Qt to come into play is to be able to compute the speed based on the enter/exit points of the vehicle in the video window and maybe produce some kind of report at the end of a day/week showing the average speeds travelled and at what time of day. I'm NOT interested and WILL NOT be capturing registration plates of vehicles but this information will be used to help myself and the many other residents in the area to campaign to help get the speed limit reduced - or speed reduction measures introduced - before someone is seriously hurt or killed.
So, my tasks are as follows:
- Hook up the high-speed camera to some kind of SoM module
- Capture high-speed video data reliably
- Run some kind of motion capture system
- Feed the motion capture data into a Qt application for post-processing
- Produce some kind of report based on previously acquired data
Simples, right :)
-
Hi,
From the looks of it, you should consider using OpenCV for the image processing. That library is made for that kind of task. If the camera is seen normally by the system, you can use the OpenCV capture capabilities to read from it.
Then you can use Qt for the rest.
LiveCV might also be of interest.
Hope it helps
-
@SGaist Thanks for the heads-up regarding OpenCV - its not something I've ever had the need to look into so it'll be a good adventure into the unknown.
The camera module has an RS232-like interface for controlling things like zoom, video format, etc. The SoM I'm planning on using already has OpenCV support as well as an add-on board for cameras so, with a bit of luck and the wind blowing in the right direction, it shouldn't be too tricky.
-
@webzoid not using Qt but OpenCV / Python / Raspberry Pi camera, you may want to take a look at this project, since it does what you're aiming for.
-
@Pablo-J-Rogina thanks for the link - very useful indeed and a very good starting point.
Ultimately I'm going for a fully-integrated solution which will have its own waterproof housing and could potentially be Wi-Fi linked to a home network (for email notifications, web access, etc).