Detect Cars Running Stop Signs (and Squirrels Running Across The Roof)

There’s a stop sign outside [Devin Gaffney]’s house that, apparently, no one actually stops at. In order to avoid the traffic and delays on a major thoroughfare, cars take the road behind [Devin Gaffney]’s house, but he noticed a lot of cars didn’t bother to stop at the stop sign. He had a Raspberry Pi and a camera, so he set them up to detect the violating cars.

His setup is pretty standard – Raspberry Pi and camera pointed outside at the intersection. He’s running OpenCV and using machine learning to detect the cars and determine if they have run the stop sign or not. His website has some nice charts showing when the violations occurred by hour and by day of the week. Also on the site are links that you can use to help train the system in noticing cars, cars that run the stop sign, determining if there’s enough of the video to determine if there’s a violation, and whether or not there’s a car going the wrong way through the intersection.

This is an interesting use of the Pi and OpenCV; there’s no guarantee that this will help the people of [Devin Gaffney]’s neighborhood, but hopefully gives them some ammunition (assuming they want something done about the intersection.) It’s a cheap and easy setup and it’s nice to let the community have a hand in training the system. For more OpenCV, check out this article on taking the perfect jump shot or this one which tries to quantify cloudiness. Cool stuff.

[via reddit]

40 thoughts on “Detect Cars Running Stop Signs (and Squirrels Running Across The Roof)

    1. If I recall correctly, I actually checked out motion but the framerate wasn’t fast enough with my particular Pi/Camera combo (I got the camera from a computer retail store in town rather than wait for a RPi camera to come in through the mail)

  1. Would be nice if there could be collaboration with the local police, and then some way to get ANPR data from the violations. (a new camera would be required perhaps with some more zoom and then it could be located at the same place).

    Then feeded into a automatic ticketing system that tickets every driver that violates the stop sign. (by sending it home to the mailbox).

    The evidence is there, its just that the local police needs to provide some API for uploading the evidence and also auto-ticket the driver.

      1. Okay, so where do we draw the line??? Would you think differently if your wife and children were taken from you by some fool who thinks that he’s too important to follow the law and stop at a simple traffic control? Or what about when your young daughter is being gang-raped by the group of kids down the street at the park? Would it be okay to “citizen police” then? Where is the line, huh?

      1. Then you should either change shocks (unlikely) or realize that one, driving at the right velocity, will not have a problem with the bump. That’s assuming that the bumps are designed correctly however that isn’t exactly rocket science…

    1. And those with really cool cars, like McLaren and Koenigsegg. And why would you want to pay for good roads, then pay more for someone to put bumps in them? Letting scofflaws control your behavior is not a rational solution.

  2. How dare he try and use technology to deter/punish drivers who put themselves and others at risk ! Why anyone with an inkling of common sense will tell you that the only video that’s acceptable for law enforcement are bank teller videos and convenience store clerk videos !! – anything else is “we can’t cross examine the witness” (the camera).

    If we put video cameras up in my home state that auto-ticket for speed violations (ie. 80 in a 65 mph zone), we could close the budget gap *overnight* ! (with the “voluntary contributions” that drivers would be making – voluntary in the sense, they choose to contribute by disregarding traffic laws).

    Now, red-light cameras were a good idea/corrupt implementation – since evidently the yellow time was in the order of 2 seconds. Those scandals gave the industry a bad rep, and when we’re inundated with the majority of drivers who don’t give a crap about traffic laws, it’s a losing proposition.

    What would be great if we could have ‘citizen traffic police’, certified observers/cameras that could capture violators in the act and issue violations with police cooperation, and a “bounty”/financial incentive given.

    1. Not a fan of Cameras in the hand of goverment for any reason. A buddy of mine in El Paso has a picture of him going though a red light that the city made him pay. Only one problem with it though, you can also see the officers waving him and others though the red light X-). City didnt care though, they still made him pay it.

  3. I need something like this but that will log speed so I can send it to the cops, not to bust anyone but to convince them to put in speed bumps or at least the alert signs that tell you how fast you’re going vs the speed limit. I live on a nice twisty road with a 35 mph speed limit, but since it’s really fun at about 60 lots of people bomb up and down my street… Problem is there’s a lot of driveways in the curves, such that if you’re going more than 35 it becomes a problem for people getting out of their driveways (I’ve almost been hit several times)

Leave a Reply to INOCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.