Citizen uses OpenCV to track speeders near his home
cvilletomorrow.org
cvilletomorrow.org
> One very interesting approach I have seen overseas is a traffic light that turns red if you are speeding as you approach it. It's incredibly effective; instant feedback on your behavior, and immediate loss of any time you gained by speeding. No ticket, unless you run the light. Drivers quickly conclude they're better off by not speeding.
In an ideal world drivers wouldn't speed and they also wouldn't tailgate, but in the world we currently occupy both are extremely common (even amongst law enforcement).
So while this would act to reduce speeding, the unpredictability may increase accidents and it is definitely going to reduce traffic flow.
Usually the lights are also a good distance after the radar so you have plenty of time to go from speeding to a halt :)
I'd also be surprised if speed-sensing lights really increased collisions much. They still go through a full yellow before turning red. They are only more unpredictable if you know the light's cycle time, watched it turn green, and are carefully timing it so you could otherwise predict it.
https://www.google.com/maps/@38.8393523,-77.0661647,3a,75y,3...
Of course, if I've seen them without any signs then I wouldn't even know it....
Chicago had a pretty significant red light camera deployment about six or seven years ago. Drivers used to be okay with blowing through a red that was a yellow a moment before in the past. Now everyone slams on their brakes when they see a yellow. According to time.com, "a 22% increase in injuries from rear-end accidents."
So yes, you can expect more rear end collisions and injuries when traffic light enforcement automation breaks up traditional driving habits.
Arguably, its okay to speed. Say doing 50 in a 40 when there's no traffic, like late at night. Why do we need a system to enforce this? I wish there was more fuzzy logic applied to traffic systems. Say a peak hours vs non-peak hours speed limit. Longer yellows during rush hour when everyone is stressed and potentially distracted. Instead we get hard and fast rules for all conditions, which doesn't make much sense.
http://time.com/3643077/red-light-cams-rear-end-collisions-c...
The Time omitted the fact that side-swipe collisions tend to have more serious injuries than rear-end collisions. They also failed to mention that red light cameras reduce the number of pedestrian and bicycle collisions.
"Taken together, the study shows a statistically insignificant increase of injuries by 5%."
Time's source is the Tribune:
http://www.chicagotribune.com/news/watchdog/redlight/ct-red-...
Emanuel has credited the cameras for a 47 percent reduction in dangerous right-angle, or "T-bone," crashes. But the Tribune study, which accounted for declining accident rates in recent years as well as other confounding factors, found cameras reduced right-angle crashes that caused injuries by just 15 percent.
At the same time, the study calculated a corresponding 22 percent increase in rear-end crashes that caused injuries, illustrating a trade-off between the cameras' costs and benefits.
The researchers also determined there is no safety benefit from cameras installed at intersections where there have been few crashes with injuries. Such accidents actually increased at those intersections after cameras went in, the study found, though the small number of crashes makes it difficult to determine whether the cameras were to blame.
>They also failed to mention that red light cameras reduce the number of pedestrian and bicycle collisions.
From what I can tell, no one has done a study on that and it sounds questionable to me to see any results there. In fact, Chicago has a big problem with cyclists hitting pedestrians since it added so many bike lanes. But that's a discussion for another time I suppose and a problem that'll probably take care of itself as cyclists and pedestrians get used to each other.
It's been installed in a test location for years, and is being deployed in several cities in Sweden at the moment.
Speeding kills. Something as small as 10 miles over a 30mph may mean a doubling in fatality rate for pedestrians and bicyclists.
One source: https://www.aaafoundation.org/sites/default/files/2011Pedest...
However, many speeding tickets (at least in my country and others) are due to low maximum speeds on roads intended as main thoroughfares.
I read here in HN that plenty of U.S. towns live off speeding tickets, see
http://www.foxbusiness.com/features/2011/10/19/town-that-liv...
http://www.9news.com/story/news/local/investigations/2015/05...
In my country they have some similar systems, and made even worse because they specifically target tourists and foreigners (especially Argentineans) for the ticketing revenue.
I work for an insurance company, and I've read some research that suggests that speed limits are improperly sent more often than not (a few times too high, but most often too low). Interestingly, accidents are going steadily down due to better cars. Other factors are much bigger influences than just speed (alcohol, stress, etc.), and insurance companies are introducing monitors for that. Hopefully self-driving cars will continue the downward trend :) .
IMO, dynamic speed limits, based on weather and road conditions and other stuff (lower on school days?), should be the default in the 21st century :) . Germany already does it.
Another problem was improperly planned roads, as in the article (another comment mentions that the road in question is a "feeder" road).
The speed limits are a social contract. If someone feels they should increase the risk to others above and beyond that agreement then they can at least fund some civic infrastructure to balance things out.
I'd say the street must not be posted right, or maybe its got an unusual speed limit for the type of road. That fools people. We have a local road on the West side that should be a thoroughfare. But its zoned residential, so 30MPH. Everybody speeds - there are no driveways, no slow traffic, no pedestrian traffic, no risk. I'd argue they just got the signs wrong.
There are various things that play against safety in residential roads marked for 25 MPH speeds.
In the winter, they're rarely cleared of snow and ice, making them a hazard to travel even at the speed limit. Cars are parked on both sides of the roads much like a typical city street, reducing visibility of pedestrians as they emerge from between cars unexpectedly. And then there's the children playing in the yard who are preoccupied with their activity and not always paying attention to their own safety.
My daughter is hard of hearing (she requires hearing aids to hear and even with them she doesn't have normal hearing) and very ADD. We've continually lectured her about "not running into the street" without making absolutely certain there are no cars, but on one occasion she was nearly hit chasing a ball despite my wife and I being out front screaming and running after her as she bolted into the road. The ball was destroyed by a speeding car who almost also hit the neighbors mailbox when he swerved to avoid killing her. He missed, thank God, but even afterward continued at his breakneck speed down the rest of the street. Since that incident, we rarely allow her to play in the front yard and never allow it between 4:00 PM and 7:00 PM due to the rush hour traffic using my subdivision as a bypass for a poorly timed intersection's traffic light.
A good awareness test to try (on a barren road out of the city and away from any traffic) is to slam on your brakes at various speeds, and in various conditions (dry/wet/pouring), and observe how much time it takes for you to come to a stop. Bonus points if you're still in your own lane when you arrived to that complete stop.
The latter narrows your peripheral vision such that looking straight, you won't be able to detect movements on the footpath and crossing streets.
EDIT: A famous commercial by NSW government [1] about the difference of 5km/h.
Near my home there is a major thoroughfare with a 35 MPH speed limit. It has no homes facing the road, just a few fenced backyards some fair distance away but mostly it has farms, ponds, and golf courses. People regularly go 40-50 MPH down this road.
Another major road that crosses this one has a speed limit of 55 MPH. It has several houses directly on it. I've stopped once to let an old man cross the street to get to his mail box. It has a school (where the speed limit drops to 45 MPH). It is too narrow and dark in my opinion to have a 55 MPH speed limit.
I believe both roads should be 45 MPH.
Furthermore, the freeways through town are 55 MPH speed limit. Ridiculous. Most states have 65 MPH limits even within a city. (I didn't grow up here, obviously.) So naturally there is a lot of speeding.
There are probably several rules and reasons for these limits. The 35 MPH road is within city limits while the 55 MPH road is technically in a different township and would once have been considered a farm/country road though it is now a major road to an office building complex and school. We also have to deal with snow and other weather conditions part of the year, and we don't have electronic speed limit signs to change the speed limit or something based on changing conditions.
Then there's also the fact that city planners never manage to build sufficient roads until the current ones are overcrowded. So this 35 MPH road probably was not originally intended to be such a major road, but there isn't any other good way to go N-S through that part of town because the rest is all winding back and forth through neighborhoods.
I would definitely be in favor of having speed limits that were consistent and actually made sense, then enforcing them very carefully.
(Note that the article doesn't say how much over 25 counted as speeding. Did he count 26 as speeding? My own metric is that if it is less than 5 over then it is not speeding.)
If pedestrians or bicyclists use a road, the speed limit is 20MPH, strictly enforced.
Consequently, they also have a grand total of 0 pedestrian fatalities most years.[1]
As a planner, I always find this sentiment amusing. The only thing less popular than being stuck in traffic, is the use of eminent domain that would be required to pave ever larger percentages of our urban land.
Planners can't expand roadways into the 5th dimension. Roads require land--a lot of it in fact. Also, it's not like planners don't anticipate that congestion will be increasing if demand for vehicle travel and population also increase.
Lastly, the prevailing wisdom in planning is that "widening roads to combat congestion is like loosening your belt to combat obesity." There's a popular press book that talks about how increasing roadway capacity can paradoxically worsen traffic: https://books.google.com/books?id=ckLcxEb5tM8C&hl=en
I do not speed -- I had received a ticket in my 20s that raised my insurance rates so much that I just don't accept the risk. There's a road near my house that practically everyone drove 50 MPH down despite a 40 MPH posted speed limit. They raised it two years ago to 55 MPH after a traffic survey and as a result, I am no longer passed when I drive at the posted speed. It's an anecdotal account, but I'm on that road a few times a day many days and it's a stark difference. When the speed limit is set to what people drive, most people stop speeding.
That said, residential roads at 25 MPH is a rule that the 85th percentile rule doesn't apply to -- for good reason. Parked cars where pedestrians emerge, roads that are not maintained well or cleared for snow/ice, and children who do not have the proper sense to not "run off into the street chasing a ball" all make speeding in subdivisions dangerous.
The road by (unintentional) design seems promotes higher traffic speeds by having few impediments; it is also intersects a highway (BVP 250 via Google Maps), which I suspect could influence drivers near the highway to be increasing speeds or maintaining speeds they had while on the highway. I'd like to know where the speeding is occurring in relation to proximity to the highway.
This made me want to explore how speed limits are set.
I found this "Methods and Practices for Setting Speed Limits: An Informational Report" by the U.S. Department of Transportation: Federal Highway Administration.
- http://safety.fhwa.dot.gov/speedmgt/ref_mats/fhwasa12004/ - http://safety.fhwa.dot.gov/speedmgt/ref_mats/fhwasa12004/fhw...
Anecdotally, it seems to work pretty well, drivers do slow down when they approach the sign and don't seem to speed back up afterwards. I do not know if it's the personal reminder or the shame of showing your speeding to everybody around.
Sign've been here a while and seem to keep their effect, they don't seem to become part of the scenery and ignored over time as regular static signs are wont to do. And that applies to both car and bus drivers.
I think they actually work by intimidation. Remind them that The Man is watching and they could get a speeding ticket. Once people realize that this is an empty threat and nobody is handing out tickets, they'll go back to their usual behavior.
However they will usually keep drivers under 10 over the limit (that it believed by many to be the threshold for an officer to pull you over).
Which isn't even fast enough to get a ticket from local police.
In my state (which is not Virginia, and it will vary everywhere), local police are prohibited from using radar and need to use an actual stopwatch to track your speed. Obviously very error prone, and they're supposed to basically give you 10 mph leeway - meaning on that road you basically couldn't get a ticket for going under 36 mph.
Also it doesn't say what they determine speeding to be. Based on his description the vehicle should be wholly between both markers for 40 frames at exactly 25 mph. Are cars that touch the mark on frame 39/40 considered speeders since they're going ~25.025 mph? There is a reason many states do not start issuing tickets until 5, 6, 9, 10+ mph over the posted limit.
That's ridiculous, elsewhere it is 10% because that is the legal requirement of the speedometer
The state police can use radar so the floor goes down to 6 over the limit if they are enforcing.
Usually radioed to a second car down at the next intersection.
It's pretty funny to drive back into the city from points west on I-66 as the speed limit drops 70-65-60-55. I usually maintain a steady 7 over and that makes me go from one of the fastest cars on the road to one of the slowest.
Most of the time people receiving the 1-5 MPH tickets are receiving them for violating the speed well beyond that amount (with the actual clocked speed written on the ticket). This encourages people to just pay the ticket without fighting it since they've been given a much lower civil infraction and it makes it a lot harder to succeed in court since the judge knows "radar calibration/accuracy" is much less likely with the written, clocked speed.
A 20mph speed limit, strictly enforced would drop pedestrian fatality rates to essentially 0.[2]
1: http://humantransport.org/sidewalks/SpeedKills.htm 2: http://www.visionzeroinitiative.com/
FWIW, I've never been pulled when I was following those guidelines (driving in GA + SC).
Even so just because the police aren't allowed to give you a ticket because of the measurement error or uncertainty or mercy doesn't discount that they're still speeding.
As the story says, the motivation was that a kid was hit by a car on that street in October.
In a few places near where I live there is extremely clear signage about the speed limit, and that speed cameras are in effect, 100% of the time, every single day. If you speed there, you will get a ticket. The systems are configured to only send the data of speeders, and are audited. It is extremely effective.
I prefer this system in every way to the way tickets are generally handled in the US. It's effective, it's fair, it does not discriminate against minorities, it does not endanger lives of the driver/police/other drivers as pulling someone over does, and it's much easier for me to avoid a ticket, it respects my privacy, persuasive / weeping / friends of cops can't get out of it, there's no chance for police to start tacking on other violations (your blinker is broken!)... etc, etc, etc.
It's just better in every way, except the fact that driving on these particular roads is really boring!
It's not just a neat tech hobby--this is a busybody pitching what amounts to ubiquitous rule-enforcement to the local government.
http://pix11.com/2015/11/19/red-light-cameras-may-be-causing...
Saving the data for later mining, OCRing license plates to build a record of cars traveling around town, etc. would be a different story because that affects everyone whether or not they're choosing to break the law and spans more than a single incident in time.
1 - Do nothing
2 - Put a camera there just to get a % of cars going 5+ over the limit
3 - Put a camera there to OCR everything and save it in perpetuity
The distance between 1 and 2 is quite large but the distance between 2 and 3 is very small and doesn't necessarily come with the same public notice/disclosure/outrage instituting 2 would. The safest course of action strictly from a privacy perspective is to oppose anything that makes implementing #3 easier.More importantly, however, there are multiple forces driving deployment of cameras in a variety of area (e.g. right now my city is offering homeowners a tax benefit to install one because of an increase in crime, many people want all police activity to be recorded, etc.) and it seems unlikely that anything will reverse that trend. I think that means that the way to prevent abuse isn't to try to fight block the technology but rather to focus on legal protections & oversight – things like retention policies, restricted access and logging, etc. to avoid strengthening the argument that privacy activists are preventing legitimate police work.
I haven't seen any information on the effect of cameras at merging sites, though.
Also, if people aren't maintaining a safe distance from the car in front of them, then that's useful information too. So is video of people illegally using their celphones while driving, which this technology could also provide.
But surely your answer to something that quantifiably increases injury rates isn't "who cares it's their own fault" is it?
But since you asked for a citation: http://bfy.tw/4343
http://www.cnet.com/roadshow/news/red-light-camera-myths-deb...
Also, as I said, if people are tailgating then that's a separate problem that can also be addressed by this technology. It's insane to say that we shouldn't discourage one dangerous behavior because of some other equally-addressable dangerous behavior. People respond to the knowledge that they're more likely to be caught when they do something wrong or stupid. An actual police officer issuing citations for exactly these offenses is effective, but costly. Having the information about frequency of offense at different locations allows those scarce resources to be allocated to greatest effect. What's your problem with that?
http://www.fhwa.dot.gov/publications/research/safety/05049/
That one actually shows roughly net zero change in total crash rate, but a decent decrease in the injury rate.
I'd love to see an open source implementation of this. I'd put it up to get data on speeding and see if it could be adapted to catch people running the stop sign in front of my house. I see at least 2 cars per day run it and that's just in the time I'm outside to do quick things like checking the mail.
I would thinking rolling through a stop sign (especially at an intersection that is not a 4-way stop) would be much more dangerous than going 30 in a 25.
This is exactly the scenario I have outside of my house. The speed limit on both streets is 25mph, but when most people don't stop at the stop signs and everyone is going too fast...
The issue is even worse at certain times of the year (right now) because, depending on the direction you are going, the cars with no stop signs are mostly blinded by the position of the sun between trees and houses. Just last Monday a neighbor stopped by to say he turned the corner and side-swiped my mailbox because he couldn't see anything.
As far as speeding goes, I generally stick to the limit in a residential but when I'm being tailgated I'll speed up to 30mph. I'd rather only have to worry about stopping the force of my vehicle if a child runs out in front of my car. But it rarely makes a difference, most people want to go 40-45mph and become visibly irate at anything less than that. Things like that make me happy that self driving cars are somewhere on the horizon.
Looks like Mr. Reynolds has begun building a data-set to support what the handful of highway engineers I've spoken to on the subject just assume based on observation.
I have a camera setup on my RPi for this purpose, but never got around to tying in OpenCV (though it's something that's been on my list for some time). At the time I couldn't find/didn't look hard enough for a good open source implementation.
It looks like this can be done relatively easily using an RPi and Python: https://www.raspberrypi.org/forums/viewtopic.php?p=813535#p8...
The Github repo for the code is here: https://github.com/pageauc/motion-track/tree/master/speed-tr...
Video with a code walk-through and demo is here: https://youtu.be/eRi50BbJUro
I know what I'll be doing tonight. :o)
[1] https://en.wikipedia.org/wiki/Photography_and_the_law#Public...
Even dummy cameras can get you in trouble (e.g. employer installing them in the office kitchen, etc).
However, it seems many other countries do allow public photography and filming within reasonable limits. On a side tangent, I wonder if this means that German media uses many less public crowd shots than non-German media channels, if only because of the stricter privacy laws that would require individual consent for any person showing up in the image or frame.
[1] http://www.bbc.com/capital/story/20130625-your-private-data-...
About webcams, AFAIK, the exception is either because people and car plates cannot be identified clearly for the image quality (and frequency) is low, or because they asked for a special authorisation.
Filming and publishing license plate numbers can get you in trouble in some places and I'm sure there are other rules I'm unaware of related to what you are allowed to publish publicly, but what he's doing is likely very legal and protected by the First Amendment of the US constitution.
- No more speeding
- No more tickets for speeding
- No more driver's licenses or DMV waits
- No more car insurance
- No more "Driving While Black"
- No more DUI
- No more merging too slow
- No more not signaling
- No more cutting you off
- No more rear end collisions
- No more speeding to make the light
- No more driving too slow
etc, etc, etc...
50 is higher than 30 so common sense tells you that you are going faster. Even if it is not true. There is a subconscious reaction of people to numbers, no matter the metrics.
I've had it on my "list of side projects" to solve this problem with OpenCV, but haven't gotten enough "Tuits" to get it done, yet since the camera footage has been enough to get me a police car in front of my house monitoring speed. My cousin is a cop in my county and he's indicated that the spot is basically a "ticket-writing factory" -- they don't even bother with cars going 5-10 over since there are so many going 15+ and parking right in front of my house, across the street, puts the cop in a spot where he's not able to be noticed until the car is too close to slow down enough to avoid a ticket.
For a while, the spot was even marked as a speed trap on Waze (not sure if it still is, nor whether or not I was the one who marked it :), but I haven't looked in a while).
When I get it done, I'll be sure to post the complete code along with a blog post on how to set it up, but if there's anything already out there that could get me close, I'd love to know about it.
Next month, he'll have a facial recognition system for dog walkers who fail to curb their dog.
A 25 mph speed limit on a street with a bus route is applying a band-aid in most situations. You're never going to get 100% compliance with traffic law, so if a safe pedestrian corridor depends on that, you lose. (By the way, "stepped up" enforcement lasts until the local neighborhood association folks get a ticket for rolling through a stop sign.)
I had a similar issue in my neighborhood a mother and child were hit by a driver making a turn in a corridor with a lot of near misses. Instead of going on some punitive goose chase of enforcing an unrealistic speed limit, we (members of a neighborhood association) approached it as what it was -- a traffic engineering problem.
In our case, traffic light timings weren't adjusted appropriately, so drivers felt compelled to "race" in order to catch a light. Lane markings were unclear, so it wasn't obvious where drivers should be if they were turning. Crosswalks tape was pulled up, and it wasn't obvious to a driver turning where the pedestrians crossed. Also, the pedestrian signal buttons were broken.
We lobbied the city council people and mayor pretty heavily, and they made a few modest investments in signals, signage, paint and a traffic study. 5 years later, accidents dropped by 40% in that corridor.
Speeding in a subdivision is annoying to those who live in the subdivision -- it adds to the noise and makes it a pain to get out of the driveway in reverse -- but it's way more than that when you have young children, especially when they have disabilities as one of mine does.
My daughter is hard of hearing (not deaf, but requires hearing aids) and is exceptionally ADD. Last year, she was playing with a basketball in our driveway and it slipped out of her hands and into the street. Mom and I were on the porch when we saw her go after a basketball, we got up running and were screaming at her. She didn't notice us or the car as she emerged from behind a parked car into the street chasing her ball. The driver ran over the ball and narrowly missed hitting her (also narrowly missed the neighbor's big brick mailbox as he swerved). He didn't slow down, just swerved and continued on at a breakneck speed. The kids are no longer allowed to play in the front yard.
Now, sometimes residential roads are indistinguishable from main roads -- lane markers and such can make it easy to speed "by accident". This is not the case in my subdivision. We have a large marquee indicating the name of the subdivision and a posted speed limit (25 MPH) sign. It's all houses, tightly packed, except for an elementary school. Because of a light with poor timing that causes a back-up on the main road, our subdivision is used as a bypass during Rush Hour.
I set up an RPi connected camera to help me make the case for increased enforcement after my daughter was nearly hit by a speeding driver. Two-thirds of the cars appear to be going well over 25 MPH and over half are going so fast it's obvious they're going 15 MPH over the speed limit.
I doubt anyone is in such a hurry that they're consciously choosing the safety of residents of my neighborhood over their 1/2-minute reduction in travel time to their destination, but their actions are just that. I'll be adding this feature to the software I use to track traffic in my neighborhood. I might even go so far as to shame the worst of the drivers (mostly 16-17 year-olds). I even toyed with the idea of setting up a sign that lights up a "Slow Down" message when a car is obviously speeding, but I'm betting that'd run afoul of local ordinances. Incidentally, I had tried to get a "Deaf Child/Disabled Child" sign put up, but I was told the township no longer does this and given the dubious excuse that "they provide a false sense of security" (no -- "they're expensive" or "we're tired of having to change them when the wording is decided to be 'politically-incorrect' every few months" is the problem -- they still put up "Pedestrian Crossing" and other related signs and they still maintain the existing ones when they get knocked over).
Your kids have been nearly killed on several occasions. Why are you projecting anger at some schmuck trying to drive home, but not standing in front of your town/city/county officials to fix the light?
If the light gets fixed, people stop using your subdivision as a through street.
Look around and try to find a civil engineer who does traffic management to talk to. This stuff is a science -- if you make the right demands, you'll get what you want and be able to sleep at night.
What I'm equating is the mental state of the busybody: The need to go out looking for rules being broken that otherwise would, in all likelihood, go unnoticed.