Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Claude Opus 5.5(anthropic.com)
    449comments
  2. OpenAI GPT–6 Astra breaks Enigma message that has resisted solution since 2005(cryptocellar.org)
    289comments
  3. There's a high chance of devices being sold with GrapheneOS preinstalled in 2027(grapheneos.social)
    22comments
  4. Claude Opus 5.5 Intelligence, Performance and Price Analysis (Max)(artificialanalysis.ai)
    25comments
  5. WordPress: Unauthenticated path traversal leading to conditional RCE(github.com/wordpress)
    17comments
  6. OpenAI is well positioned to fast-follow Jev(arcturus-labs.com)
    116comments
  7. 16-bit Intel 8088 chip(allpoetry.com)
    7comments
  8. Launch HN: Coverage Cat (YC S22) – Umbrella insurance via your personal agent(coveragecat.com)
    8comments
  9. Writing Rust code that's fast by asking agents to make the code faster(minimaxir.com)
    23comments
  10. Apple has added persistent 'ads' to iOS, and it's driving users crazy(techradar.com)
    288comments
  11. Show HN: Drop – A rootless Linux sandbox with gVisor support(droprun.sh)
    37comments
  12. Show HN: AI·rete·RAG – a Rete rule engine decides, RAG explains why(ai-rete-rag.com)
    discuss
  13. Solitaire Alone Together(solitairealonetogether.com)
    20comments
  14. Can gzip be a language model?(nathan.rs)
    127comments
  15. AMD's random number generator can't generate a 0?(flatassembler.net)
    154comments
  16. Truman World(trumanworld.live)
    26comments
  17. One Minute Park(oneminutepark.tv)
    3comments
  18. Spymarks, not Watermarks(brand.io)
    156comments
  19. Show HN: InstinctFlash – Run 5B world-action models in real time on Jetson Thor(github.com/general-instinct)
    discuss
  20. The Economics of Open-Weight Inference(ornn.com)
    10comments
  21. Side-stepping the Secretary Problem, unwittingly(evalapply.org)
    1comments
  22. I asked Meta’s Muse for its filesystem and it sent me 6.8GB(mouse.dev)
    109comments
  23. MUNI Heritage Weekend in San Francisco(lawrence.lu)
    23comments
  24. Teleoperated Humans(jefftk.com)
    37comments
  25. Transformers Explained Visually(poloclub.github.io)
    85comments
  26. Meta’s Muse has a serious 0-day(arstechnica.com)
    33comments
  27. Relativistic raytracing(publish.obsidian.md)
    3comments
  28. Vacate a drone restriction that criminalized recording immigration agents(eff.org)
    13comments
  29. I said no and Apple said yes(dbushell.com)
    553comments
  30. MiMo v2.6(xiaomi.com)
    464comments

Raspberry Pi Car Speed Detector

187 pointsby 10y agogregtinkers.wordpress.com
68 comments
10y agoHN ↗

"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 :/

10y agoHN ↗

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.

10y agoHN ↗

Maybe cut out the "car" because what if a van or truck passes by?!

10y agoHN ↗

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.

Someone please educate someone. Please. lol

10y agoHN ↗

Well, at least that Harrier story was somehow good-natured, and not just uneducated filth like the glyphosate thing.

10y agoHN ↗

lol shit I picked some random GMO related shareable. Guess I picked the wrong one..

10y agoHN ↗

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?

10y agoHN ↗

And it really is more of a measurement device than a detector. The car is there one way or another, it's measuring the speed of it.

Maybe a "Linux Speed Measurer" however that starts to sound like it's related to measuring the speed of your OS.

Maybe "Linux-based External Object Speed Measurer"

10y agoHN ↗

How about "Object speed measured by image processing (extracted from video input)" or osmbipefvi for short....

10y agoHN ↗

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

10y agoHN ↗

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.

10y agoHN ↗

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.

10y agoHN ↗

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.

[0]: https://github.com/ChristopheJacquet/PiFmRds

10y agoHN ↗

Well...there is a V4L2 driver for the Pi camera. Strictly speaking, they didn't have to use the picamera module.

10y agoHN ↗

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."

10y agoHN ↗

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.

10y agoHN ↗

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

10y agoHN ↗

You could just use licence plate recognition x2 and measure average speeds instead.

10y agoHN ↗

The UK has an insurance lookup database, although you're only supposed to use it on your own car: http://ownvehicle.askmid.com/

I've been wondering if it would be possible to combine that with ANPR to give a dashboard-level indicator of uninsured vehicles to watch out for.

10y agoHN ↗

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

10y agoHN ↗

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.

10y agoHN ↗

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!

10y agoHN ↗

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.

10y agoHN ↗

From this, you need an LED sign in your yard "Your speed is: [speed] MPH and your car is being photographed"

10y agoHN ↗

A camera flash also gets the message across.

10y agoHN ↗

I am seriously considering implementing this and tying it into the nextdoor.com API to creating a wall of shame in my neighborhood.

10y agoHN ↗

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.

10y agoHN ↗

You at least need a drone with camera for it. You would need to implement some object recognition on the images transmitted by the drone

10y agoHN ↗

Wut. The parking spaces are viewable by my apartment window.

10y agoHN ↗

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.

Now, learn to code it.

10y agoHN ↗

Or just remotely send yourself a photo of your parking lot.

10y agoHN ↗

Also: clouds, nighttime, people walking across the lot, and any other color changes that aren't related to other vehicles being parked in the spots.

10y agoHN ↗

Plug in a webcam, and upload a photo to a server every minute or so. Or put the Pi online.

Humans are still better at parking spot recognition than $35 hardware.

Of course you'll need a camera with a time machine so you know the spot will be free when you arrive, and not just when you set out.

10y agoHN ↗

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.

10y agoHN ↗

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"

10y agoHN ↗

Couldn't you just get a decent security camera and uh, well... look?

10y agoHN ↗

Did not you said "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."

10y agoHN ↗

I'll give it a shot, if you can shoot a couple of short stable videos and images of your parking spaces and upload them somewhere.

10y agoHN ↗

That would be cool, I'll get them to you in about 4 hours when I'm home.

10y agoHN ↗

You are truly living up to your username! :)

10y agoHN ↗

Sorry I got home late so it's too dark, I'll get you those first thing tomorrow morning.

10y agoHN ↗

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?

10y agoHN ↗

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.

10y agoHN ↗

Very simple and fun little project. Great job.

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?

10y agoHN ↗

Is it practical enough that you could do anything with it, like give it to the police for a citation?

Or is it just awesome in a nerdy sort of way?

10y agoHN ↗

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.

10y agoHN ↗

Good point but definitely nice to have something credible to have a discussion about the jerk driving 75 on your 25mph street.

10y agoHN ↗

I wonder if one could figure out other vehicle speeds from a dashboard camera. His method looks like it assumes a stationary view.

10y agoHN ↗

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.

10y agoHN ↗

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.

10y agoHN ↗

If you had an OBDII adapter and a camera this should be possible! I'm not sure if there is OBDII communication code for RPI, though

10y agoHN ↗

It would seem to me the best way to reduce speeding on this road is to raise the speed limit.

Doubling the speed limit to 50mph would probably reduce speeding by 75%.

10y agoHN ↗

It wouldn't reduce the noise inside my house though.

10y agoHN ↗

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.

[1] http://www.ghsa.org/html/media/pressreleases/2016/20160412sp... [2] http://www.iihs.org/iihs/sr/statusreport/article/51/4/3

10y agoHN ↗

AWESOME!!! I wanted to work on such project to police my neighborhood speedsters. :-)

10y agoHN ↗

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.