Nice! Combine this with license plate recognition, and you have the start of an open platform for traffic safety that is both awesome and deeply creepy.
I've thought about a platform that collects speeds of vehicles and then publishes a database of speeds matched to license plates as an open data set. Police would likely not touch it, but a large enough database might be a tantalizing prize for automobile insurance companies. And then my desire for more disincentives for speeding runs afoul of my feelings about dragnet surveillance, and so I abandon it.
In terms of having the potential to effect direct action against speeders, I don't know how effective simply monitoring speeds would be. That said, some cities (such as Seattle) will lend speed profiling equipment to community groups in order to establish whether or not a given segment of road might be a candidate for traffic calming: http://www.seattle.gov/transportation/ntcp_calming.htm
That sounds insanely illegal as well. I don't know about the US, but I think in most places in the EU it's illegal to even post videos of people driving dangerously or way too fast online.
That's an excellent idea. Far too often the driver in front appears to be driving strangely so you drop back a bit and hope they or you turn off so you don't have to be hypervigilant about their driving.
If there was an automated way of dobbing a driver in to the police then this would be useful too - quick tweet/email/text with the message: uninsured vehicle AB12 CDE travelling at 35mph ___location 51°29'51.3"N 0°08'06.4"W
"Linux Car Speed Detector" might be a more accurate description, since nothing about this seems to be specific raspberry pi hardware. Honestly, could just say "Car Speed Detector" since I'd imagine this would be pretty easy to replicate on other platforms and the OS isn't really part of it either.
Really cool project though. Now I want to start playing with OpenCV. I wish i had something more constructive to add :/
That it can be done on a Raspberry Pi using the Pi camera is of interest, because cheap small hardware makes it feasible to buy and install hardware dedicated to the task.
I strongly disagree. He made the project on a Raspberry Pi 2 and mentioned how this affected his design in several ways:
* he used Raspbian Jessie (almost but not quite Debian Jessie) and followed instructions for setting up the necessary packages on that distribution
* he tweaked his code to perform adequately on the Pi2 and described the performance limits on that hardware
* his code uses the Raspberry Pi camera library
* he used the Pi camera's field of view in his distance calculations
It's true that you could adapt it to different hardware, a different operating system, a different distance, or a different purpose. Even if you're doing so, it's still useful to have a concrete example to work from. (For example, knowing that the Pi2's performance is marginal for what he's trying to do may help you set expectations for performance of your hardware in your situation.) Without including the specifics you object to, the article would be short, abstract, and basically useless.
Actually this project is pretty specific to the Pi and its camera, though it can of course be modded for other hardware.
"So it just happens that the horizontal distance covered by the Picamera’s image is roughly equal to the distance from the lens. If you are 10 feet from the lens, the image is about 10 feet across, 47 feet from the lens, about 47 feet across, and so on.
Of course, other cameras may have a different field of view and won’t have this easy to determine correspondence."
Isn't that true for all Raspberry Pi projects by the very nature of Raspberry Pis? They're just a different form factor and cost than other Linux machines, but otherwise are just a Linux box.
No. There are some that actually use the Raspberry Pi hardware, such as PiFM[0]. Others merely use GPIO, which of course can work on a number of other SBCs (eg a Beaglebone Black) or anything with GPIOs. The only Raspberry Pi specific thing here is how it connects to the webcam, because the Raspberry Pi doesn't expose the camera as a standard v4l device, they have their own way of doing it.
To a degree. Most Linux boxes don't have a couple dozen programmable IO pins and the other connectivity options for external sensors and such.
In the case of this project, you'd also have to do some modifications on the image-grabbing code. They're using a module that's specific to the Raspberry Pi camera module.
Wow. Reading that story annoyed me. Someone really wrote that with all of those obvious inaccuracies in it and someone actually believed it? THen I remember that people share shit 10x worse than this on FB and I got sad instead of annoyed.
That said, the image I linked specifically named Glyphosate while the story you posted appears to be saying that it wasn't Glyphosate, it was the co-formulants that are a problem, unless I'm misunderstanding?
I agree. As someone with some small computers laying around but non of which are pis NOR have I any pis available, I saw the title and lost a bit of interest but figured I'd read on anyway. Turns out, the pi isn't even necessary. But then how would you use a buzz word?! lol
I need a raspberry pi that can monitor parking spots so I know if I have a spot waiting for me when I get off of work. Of course I don't know how to code so it will probably never happen.
edit: I meant parking spaces outside of my apartment.
Great! I had a look, and already have some ideas I'll try out.
If possible, I think it'll be be helpful if you can shoot a second video or image with all 3 spots empty. I'll probably need it because I plan to use the curb's edges and surface colors of the slots.
Just to confirm, are these videos shot from the same spot where you'll eventually fix your camera?
Can you find me on twitter so I can PM you easier? Same username. I can get you way more data if you want. I need to bust out the raspberry pi so I can get you actual video from the camera I'm going to use.
Point a camera at the spots when unoccupied.Specify the spots exact coordinates to the camera. Set color as baseline. If the color changes by 50% or more, they are occupied. Send alert when all occupied, or when not all occupied.
Well I've got the raspberry pi, mjpeg, a camera that works. Just need to make the logic work. Here is what I'm stuck on. http://i.imgur.com/pIy3QNt.jpg
You could also zoom in so you would be looking at a car if it is parked there, and then upload the image to the microsoft caption bot service. It's pretty good at recognizing cars already, and you can just search the result for the word "car"
IFTTT api to create geo fence on my route home to poll the Pi "are there spaces left?" with an email or response yes or no with a photo at the current time.
The main problems to solve that I see are;
1- does not actually detect a vehicle, just motion
2- can only detect motion for one vehicle at a time
3- so now you know cars are going fast, but, what do you do with this data (how do you alert or punish them)
1 is a little tough to solve since it requires training some kind of classifier. 2 is not so bad if you use a velocity field and track individual objects via bounding box. 3 is basically another project. On that note, is it legal to have a speed meter on your front lawn?
I've been considering building something like this for a while. We live by a busy highway and a TON of cars pass on a daily basis. I'm really just interested in counting the number of them though I love data so anything that I could get I'd love to get. That said, I did the typical "hit a wall" thing and just performed it all in my head until I realized that I'd have trouble when this or that happened and stalled. Guess I probably should've just started. This still has some bugs to work out for my situation but seems like an awesome start!
I've always thought about attaching one of these to a longboard or bike with and LED readout so anyone behind me (or filming edits) could see the exact speed.
Definitely. The code here assumes that the vehicle's vector is perpendicular to the optical axis. If you had enough information to calculate the vector it would just be a little extra trig to measure the relative speed minus the offset of your vehicle's instantaneous speed. This is easy for side to side movement, a little harder in the depth direction - though you could get some depth info by comparing the size of the car contour at two or more snapshots (smaller indicating that it's moving away). The framerate/resolution of the RasPi setup probably wouldn't make it a good choice for this though.
So you definitely need to know your own speed to calculate relative speed of other drivers?
I have a dumb dash cam that's just awesome for video but is nothing more than video to a sd card, ie, not a computer. I've always wondered if I could use just the video using familiar objects like stop signs, mile markers or lane markers to determine my own speed.
I would think that it's just awesome in a nerdy sort of way...the programmer could just fudge the numbers and output an incorrect reading, to screw with someone they didn't like for instance.
Plus I don't think promoting vigilantism is a good thing.
Useless in court but might get a cop to put down their donuts and come look-see.
If you want to get them to slow down, buy a radar gun off ebay and put it on some kind of timer to randomly turn it on and off a few times per minute, pointed at your street.
I think you're seeing this from a "what is legal" standpoint versus the author's issue with "what is safe". If the speed limit is 25 MPH and people regularly go 50 MPH, endangering the lives of the residents, raising the limit so they can legally go 50 MPH only means they are legally endangering the lives of the residents. They don't slow down at all and are rather likely to speed up, as many drivers view the speed limit as a minimum instead of a maximum.
For example, on my road, which is not in a neighborhood and is a country road that serves as a connector between two highways, the speed limit was raised from 35 MPH to 45 MPH several years ago. Accordingly, traffic went from averaging 50-55 MPH to now averaging 65-70 MPH with occasional amateur race car drivers going by so fast you can't tell the type of car they drive. I have found it treacherous to check my mailbox and mow my lawn at certain times of the day (mainly "rush hour" and, oddly enough, Sunday afternoons). Twice in the past five years my mailbox has been obliterated by a speeder losing control of their vehicle and running off the road because they were driving too fast and/or distracted, one time right in front of my eyes as I was walking to the mailbox.
Generally, if you set a speed limit on a long straight road, you can expect the public to exceed it by at least 10 MPH. This effect has been observed by the GHSA[1] and IIHS[2] and is easily researched privately if one is so inclined.
I've thought about a platform that collects speeds of vehicles and then publishes a database of speeds matched to license plates as an open data set. Police would likely not touch it, but a large enough database might be a tantalizing prize for automobile insurance companies. And then my desire for more disincentives for speeding runs afoul of my feelings about dragnet surveillance, and so I abandon it.
In terms of having the potential to effect direct action against speeders, I don't know how effective simply monitoring speeds would be. That said, some cities (such as Seattle) will lend speed profiling equipment to community groups in order to establish whether or not a given segment of road might be a candidate for traffic calming: http://www.seattle.gov/transportation/ntcp_calming.htm