News for hackers. Stuff that matters.
Re:Militarizing your backyard with Python, Arduino, and comp... by jamesbowman on Thursday March 15, 2012 @05:09PM (#3710619)
As the person who wrote the OpenCV Python bindings, this makes me inordinately happy.
Re:Militarizing your backyard with Python, Arduino, and comp... by hugs on Thursday March 15, 2012 @09:42PM (#3711528)
Hey, thank you for that code! Your OpenCV bindings made more than one appearance at PyCon this year. I used it in my "Angry Birds playing robot". Thank you, thank you, thank you! http://pyvideo.org/video/683/building-a-robot-that-can-play-...
Re:Militarizing your backyard with Python, Arduino, and comp... by fgimenez on Thursday March 15, 2012 @06:26PM (#3710923)
I don't say this enough to people like you, so THANK YOU SO MUCH!
Re:Militarizing your backyard with Python, Arduino, and comp... by Riesling on Thursday March 15, 2012 @06:04PM (#3710848)
As a person who used those bindings in a couple of projects (this includes tutoring the computer vision course at uni) I will use this opportunity to say thanks.
Re:Militarizing your backyard with Python, Arduino, and comp... by bicknergseng on Thursday March 15, 2012 @05:16PM (#3710653)
I imagine the team behind Kinect feels the same way when lightsaber-anything gets made.
Re:Militarizing your backyard with Python, Arduino, and comp... by doctoboggan on Thursday March 15, 2012 @07:16PM (#3711109)
Awesome, I have been using the your work a lot recently. I do have one question though, is SIFT available in the python bindings? I have not been able to find it.

Thanks for contributing your time, it has made my life much easier.

Re:Militarizing your backyard with Python, Arduino, and comp... by apu on Thursday March 15, 2012 @07:59PM (#3711240)
For SIFT computation, I recommend VLFeat[1], which there are some python bindings for[2] (although I haven't tried them myself).

[1] http://www.vlfeat.org/

[2] http://www.janeriksolem.net/2011/06/another-python-interface...

Re:Militarizing your backyard with Python, Arduino, and comp... by kscottz on Thursday March 15, 2012 @08:06PM (#3711269)
Jan Erik is an outstanding guy. He has helped me through a couple of rough spots. The OpenCV python bindings for SIFT don't seem to work (or exist). The ones for ORB work really well. Here is an example: https://github.com/ingenuitas/SimpleCV/blob/master/SimpleCV/...
Re:Militarizing your backyard with Python, Arduino, and comp... by draven on Friday March 16, 2012 @06:00AM (#3712630)
A colleague of mine is developping a Cython (and OpenMP) based sift wrapper. It's available here: https://github.com/kif/imageAlignment

It's already used for alignment of X-ray images.

Re:Militarizing your backyard with Python, Arduino, and comp... by kgrandis on Friday March 16, 2012 @08:23PM (#3715928)
Thanks! You definitely made things much easier for me. I had also played around doing some raw ctypes work with OpenCV and now greatly appreciate your efforts.
Re:Militarizing your backyard with Python, Arduino, and comp... by rauljara on Thursday March 15, 2012 @05:26PM (#3710704)
I think a fair number of homeowners would be willing to pay a lot of money for a version of this system they didn't have to program themselves. And had more firepower, of course.
Re:Militarizing your backyard with Python, Arduino, and comp... by nl on Thursday March 15, 2012 @05:56PM (#3710819)
I think a fair number of nation-states would be willing to pay a lot of money for a version of this system they didn't have to program themselves. And had more firepower, of course.
Re:Militarizing your backyard with Python, Arduino, and comp... by rauljara on Thursday March 15, 2012 @06:29PM (#3710934)
A low number of false positives with a water pistol is an impressive engineering feat. A low number of false positives with an actual gun is a disaster. The technology is still a long way off.
Re:Militarizing your backyard with Python, Arduino, and comp... by DanBC on Friday March 16, 2012 @01:09PM (#3714164)
Accurate sensing, the ability to accurately distinguish between combatants[1] and non-combatants, seems to be an almost impossible task. While there are robots in active service today they all have a human involved somewhere, especially if there's lethal force going to be used.

It's pretty scary to think that humans could be removed from that loop. I can't work out why I'm happy to see totally autonomous cars but I'm wary about autonomous weapons.

(http://rusi.org/downloads/assets/23sharkey.pdf)

(http://andrewgibsondefence.wordpress.com/2010/10/17/should-k...)

[1] And even if you can identify an enemy combatant you've got to then distinguish active combatants from those who have surrendered or are injured or are mentally ill.

Re:Militarizing your backyard with Python, Arduino, and comp... by shin_lao on Thursday March 15, 2012 @06:38PM (#3710967)
It's not a problem for counter-sniping and no man's land.
Re:Militarizing your backyard with Python, Arduino, and comp... by sesqu on Thursday March 15, 2012 @07:13PM (#3711094)
No man's land control and anti-air defense is exactly what I saw such solutions marketed for, when browsing through drone tech last year.
Re:Militarizing your backyard with Python, Arduino, and comp... by Someone on Friday March 16, 2012 @04:19AM (#3712442)
I disagree. Accidentally shooting a couple of kids or pregnant women every few weeks can easily make you lose a war on the political front.
Re:Militarizing your backyard with Python, Arduino, and comp... by ajuc on Friday March 16, 2012 @05:08AM (#3712539)
In a few priviledged parts of the world.
Re:Militarizing your backyard with Python, Arduino, and comp... by patrickk on Friday March 16, 2012 @05:29AM (#3712570)
Re:Militarizing your backyard with Python, Arduino, and comp... by Estragon on Thursday March 15, 2012 @06:07PM (#3710859)
I think a number of terrorists are going to be willing to figure out how to hook such a system up to a gun on a $300 RC quadrocopter. I hope it's a small number. It's going to be interesting.
Re:Militarizing your backyard with Python, Arduino, and comp... by thesis on Thursday March 15, 2012 @06:24PM (#3710914)
Are you serious? Do you honestly think a $300 RC quadrocopter can handle the kick of a gun?
Re:Militarizing your backyard with Python, Arduino, and comp... by politician on Thursday March 15, 2012 @07:03PM (#3711051)
Does it need to be able to fire more than once?
Re:Militarizing your backyard with Python, Arduino, and comp... by lupatus on Friday March 16, 2012 @12:35PM (#3714010)
A properly designed muzzle brake will reduce the kick by 50%, potentially making the recoil small enough that your quadcopter could handle it.

http://en.wikipedia.org/wiki/Muzzle_brake

Re:Militarizing your backyard with Python, Arduino, and comp... by sesqu on Thursday March 15, 2012 @07:14PM (#3711103)
There are a number of very low-recoil guns in existence. There was even a video a few years back of a group of friends who mounted a paintball gun to a quadrocopter. So yes.
Re:Militarizing your backyard with Python, Arduino, and comp... by pilgrim689 on Thursday March 15, 2012 @09:23PM (#3711474)
Having fired real guns and paintball guns, I can tell can you this proves absolutely nothing.
Re:Militarizing your backyard with Python, Arduino, and comp... by rosstafarian on Thursday March 15, 2012 @07:07PM (#3711073)
heh that's actually an interesting problem, it would depend on how many times the gun needs to fire, also how stable can the copter be as it fires? if it only needs to get one shot off then you're good(but then it'd be more practical to load the thing with explosives, ugh that idea gives me nightmares) maybe some sort of dual gyroscopic stabilizer like a camera coupled with opposing barrels as some one mentioned, but using blanks instead of live ammo?
Re:Militarizing your backyard with Python, Arduino, and comp... by stfu on Thursday March 15, 2012 @09:37PM (#3711508)
How about some real world experiments: http://www.youtube.com/watch?v=59ttSwYNspw Disclaimer: I have nothing to do with this. Just found it one night strolling around on YouTube..
Re:Militarizing your backyard with Python, Arduino, and comp... by cbetz on Thursday March 15, 2012 @06:51PM (#3711010)
opposing barrels fired simultaneously might work, though it would be a bit wasteful.
Re:Militarizing your backyard with Python, Arduino, and comp... by Symmetry on Friday March 16, 2012 @09:29AM (#3713183)
This is a well understood problem: http://en.wikipedia.org/wiki/Recoilless_rifle
Re:Militarizing your backyard with Python, Arduino, and comp... by pilgrim689 on Thursday March 15, 2012 @09:30PM (#3711493)
I don't think so... Where is all your extra energy going?
Re:Militarizing your backyard with Python, Arduino, and comp... by MiguelHudnandez on Friday March 16, 2012 @11:43AM (#3713761)
In roughly equal and opposite directions. You'd just need something between the two weapons to withstand the compressive force.
Re:Militarizing your backyard with Python, Arduino, and comp... by pilgrim689 on Saturday March 17, 2012 @12:24AM (#3716353)
"In roughly equal and opposite directions" sounds like you think energy cancels other energy like opposing forces do. The energy needs to go somewhere; it can't bump into MORE energy and disappear. What would this "something" that absorbs all of it be?
Re:Militarizing your backyard with Python, Arduino, and comp... by aero142 on Thursday March 15, 2012 @06:33PM (#3710950)
I'll bet it can handle a 22 short.
Re:Militarizing your backyard with Python, Arduino, and comp... by pilgrim689 on Friday March 16, 2012 @12:20AM (#3711950)
A terrorist with a bomb is a threat. Terrorists with rickety flying .22s... That would just be fun to watch!
Re:Militarizing your backyard with Python, Arduino, and comp... by Confusion on Friday March 16, 2012 @04:38AM (#3712478)
Stampedes due to a gun being fired in the middle of a crowd are not fun to watch. Terrorists aren't out to do such things though; surprisingly, they have other goals than causing random terror. Psychopaths on the other hand...
Re:Militarizing your backyard with Python, Arduino, and comp... by pilgrim689 on Friday March 16, 2012 @08:45AM (#3713041)
Exactly. Terrorists trying to fight a war with flying .22s would be pathetic. They would never get even 1 shot in before the thing is taken down. I think a few people downvoting me and/or posting about the threat these things might cause don't really understand the state of this technology and/or basic physics.

We weren't talking about psychopaths. Everything is a threat in the hands of a psychopath. Give a psychopath a spoon and I'd still be worried.

Re:Militarizing your backyard with Python, Arduino, and comp... by Estragon on Friday March 16, 2012 @12:34PM (#3714001)
The definition of terrorist seems to have shifted. It used to refer to someone intent on fomenting terror in a population, but you seem to be using it to talk about soldiers in a combat situation.
Re:Militarizing your backyard with Python, Arduino, and comp... by pilgrim689 on Friday March 16, 2012 @10:54PM (#3716240)
You answer your own question with "It used to refer to...". But even so, I still don't think a flying .22 will cause "terror". Planes crashing into buildings in big cities and killing 3000 people causes "terror".
Re:Militarizing your backyard with Python, Arduino, and comp... by stfu on Thursday March 15, 2012 @09:32PM (#3711499)
I actually believe there is a growing market for something like low frills drones. Somewhat a T34/Kalashnikov of all drones, that is short ranged, maybe with FPV, something that anyone, who can use who is able to understand a joystick and three buttons is able to command. There should be a decent market for this stuff with all kinds of crazy 3rd world militias thinking they need to drone-up, plus these things should be relatively easy to export.
Re:Militarizing your backyard with Python, Arduino, and comp... by glimcat on Thursday March 15, 2012 @08:27PM (#3711332)
Guns have recoil. Grenades don't.

Also the targeting issues are vastly simplified and they're very effective in swarms.

Re:Militarizing your backyard with Python, Arduino, and comp... by Confusion on Friday March 16, 2012 @06:52AM (#3712747)
I'm not sure. I've thought about building this kind of system from time to time, but I've never gotten around to it. I'd pay up to $75 for a simple version that keeps pigeons from my balcony. Nothing fancy required: it could fire at anything that moved. I would switch if off if I wanted to use the balcony myself. I wonder whether $75 would be enough to make this a viable product.
Re:Militarizing your backyard with Python, Arduino, and comp... by wmeredith on Friday March 16, 2012 @04:11PM (#3715056)
I think you're on the right track here. This is bringing a laser pistol to a gun fight. You can keep a lot of pests away with a plastic owl attached to your roof acting as a scarecrow or with always on "dumb" ultrasonic devices. Both much cheaper and with far less moving parts.
Re:Militarizing your backyard with Python, Arduino, and comp... by ams6110 on Thursday March 15, 2012 @09:53PM (#3711569)
A real python would probably take care of the squirrels even better.
Re:Militarizing your backyard with Python, Arduino, and comp... by vibrunazo on Thursday March 15, 2012 @04:45PM (#3710512)
I'm impressed that he can get low false positives with such simple methods. That's great to know.

If he tried using line detection, vectorize it, then train the algorithm with the tagged shapes of squirrels. Would that be too slow to do in real time? Or could it work to reduce false positives?

Re:Militarizing your backyard with Python, Arduino, and comp... by SammoJ on Thursday March 15, 2012 @09:53PM (#3711571)
Adding complementary features such as edges (I'm guessing this is what you mean by lines) tends to improve the accuracy. It would also be possible to do this in real time.

I don't have time to watch the full video so I don't know what features he is currently using, but in object detection nowadays most people are using some variant of the SIFT descriptor. These are built not upon edges but on the image gradient per-pixel. The current 'hot' feature in terms of frequency of use is probably Histograms of Oriented Gradients (HOG) which do exactly what they say on the tin: Take a region of the image and count how many times a particular gradient direction occurs and the total magnitudes. Slightly more difficult to run in real-time but libraries exist.

Re:Militarizing your backyard with Python, Arduino, and comp... by kgrandis on Friday March 16, 2012 @08:31PM (#3715944)
I didn't show the false positive video. :P There were some additional features thrown in, but for presentational simplicity I went with some strong, easy ones to explain. I think one thing helped keep FPs low was some frame-based signal thresholding. So, I required a significant squirrel signal (over multiple frames) before it went hot. That prevented any small FP blip to trigger the gun.
Re:Militarizing your backyard with Python, Arduino, and comp... by arandomJohn on Thursday March 15, 2012 @05:28PM (#3710714)
I attended the talk. It was pretty cool, especially the OpenCV part. Frankly I think he needs to upgrade the armaments. Hook that bad boy up to the hose with a nozzle.

Frankly, if you wanted to, you could hook such a system up to an automated sprinkler control system and just turn on the water for whatever area the squirrels happen to be in at the moment. It would only have to be on for a few moments. Soon they'd think your yard is some sort of special hell, where water follows them wherever they go.

Re:Militarizing your backyard with Python, Arduino, and comp... by kayz on Thursday March 15, 2012 @05:57PM (#3710825)
I was there too :) It was such a fun talk, especially the part where in the end of the demo video, the squirrel stopped caring about the water cannon anymore, and decided to steal food while getting sprayed on. I wonder if there is a better way to deter them instead of bigger water cannons?
Re:Militarizing your backyard with Python, Arduino, and comp... by elviejo on Thursday March 15, 2012 @08:00PM (#3711246)
Well the arms race can begin... more potent water pistol. Then nerf dart gun... then golf balls gun... then gotcha gun... (at this point gets dangerous)
Re:Militarizing your backyard with Python, Arduino, and comp... by culturestate on Thursday March 15, 2012 @07:42PM (#3711193)
You'd have to keep the sprinkler system constantly pressurized, though. I've never seen one that can do that - they all take x seconds to really get going.
Re:Militarizing your backyard with Python, Arduino, and comp... by prawn on Thursday March 15, 2012 @07:52PM (#3711221)
Reminded me a bit of this old project from someone trying to stop non-cats or their cat carrying a dead animal from entering a cat door:

http://www.quantumpicture.com/Flo_Control/Flo_Control_1/flo_...

Re:Militarizing your backyard with Python, Arduino, and comp... by SudarshanP on Thursday March 15, 2012 @04:57PM (#3710560)
One of the spectators in that video talks about http://info.ee.surrey.ac.uk/Personal/Z.Kalal/tld.html which was discussed on HN before and a nice demo of what computer vision can do...
Re:Militarizing your backyard with Python, Arduino, and comp... by trotsky on Thursday March 15, 2012 @07:27PM (#3711141)
Awesome talk, but I can't resist: Leave it to a software engineer to find a $250 solution to a $10 problem :) (http://www.wbcboulder.com/pole_mounted_baffles_sub.html)
Re:Militarizing your backyard with Python, Arduino, and comp... by simcop2387 on Friday March 16, 2012 @12:32AM (#3711985)
I can tell you right now that those don't work at all. We've got a few on our feeders with NOTHING else around them and the squirrels still get on them. They only work if you have a single feeder/pole within about 10 feet of each other. Those little fsckers pull some ninja-esque moves jumping from metal pole to metal pole to get around them. It's entertaining to watch but it can get expensive since when they get up there they eat their fill which can sometimes be 1/6th to 1/5th of the feeder at a time.
Re:Militarizing your backyard with Python, Arduino, and comp... by HeyLaughingBoy on Friday March 16, 2012 @03:59PM (#3714998)
they eat their fill

That's when you apply the $5 solution: a slingshot.

Re:Militarizing your backyard with Python, Arduino, and comp... by TamDenholm on Thursday March 15, 2012 @08:54PM (#3711409)
Well sure, but its not really about that, its about the process, figuring out how to do this stuff and then doing it is extremely enjoyable and really cool, as is doing a talk for others who think the same thing.
Re:Militarizing your backyard with Python, Arduino, and comp... by platz on Friday March 16, 2012 @11:15AM (#3713627)
Innovation in technology comes from using technology in ways it wasn't intended, not necessarily what is the most efficient.
Re:Militarizing your backyard with Python, Arduino, and comp... by MaxGabriel on Thursday March 15, 2012 @11:28PM (#3711816)
He has trees from which the squirrels can leap to the feeder
Re:Militarizing your backyard with Python, Arduino, and comp... by trebor on Thursday March 15, 2012 @07:05PM (#3711068)
What about airsoft? You could mount a cheap, automatic, battery-powered unit and seriously sting those squirrels! I thought of using a similar system to protect the chickens I've got from the feral/neighborhood cats (I do have a fence... but that doesn't feel "complete").
Re:Militarizing your backyard with Python, Arduino, and comp... by woodall on Thursday March 15, 2012 @11:48PM (#3711873)
We have chickens too, around 25 free range + a pony + a few ducks, and had issues with dogs and wild coyotes. I think harming the animal is a bit inhumane but I totally understand where you are coming from. Remember you are a guest in their space.

Here are some suggestions that have worked for our farm:

1. Pee around the coop. Enough said.

2. Get a puppy and train him. We have an aussie that does a great job, but there are other breeds that make even better farm dogs.

3. Train the chickens to go back into the barn when the sun goes down. This isn't very hard and most of the time they will do it themselves.

4. Motion sensor and/or electric fence on a timer.

5. Be aware; this is by far the hardest thing.

Our first year we lost 10 chickens. If that's not motivation enough to do something, I don't know what is but I would never hurt another animal for doing what they do naturally.

Re:Militarizing your backyard with Python, Arduino, and comp... by trebor on Friday March 16, 2012 @10:01AM (#3713317)
Our chickens aren't exactly free-range, but they have a large fenced-in area. The fence is electric, and the chickens do go in at night. But when a cat walks by and scares them, they have a tendency to get outside the fence and not know how. And outside the fence... some of the cats would be interested in getting them. And since a big siamese-like cat comes around that will hunt ground hogs, a chicken isn't such an intimidating target.

While I understand that cats are born predators, I can't afford to lose chickens. I wouldn't kill them because they do keep pests down and may belong to someone, but I do want to scare them away from the coop.

Re:Militarizing your backyard with Python, Arduino, and comp... by woodall on Sunday March 18, 2012 @10:49PM (#3721988)
Oh yeah, I understand that. We all face different challenges when raising animals. I was just spitballing at 'cha.
Re:Militarizing your backyard with Python, Arduino, and comp... by kgrandis on Friday March 16, 2012 @08:32PM (#3715948)
I thought about going that direction, but was concerned the birds might eat the pellets.
Re:Militarizing your backyard with Python, Arduino, and comp... by trebor on Saturday March 17, 2012 @09:41AM (#3717036)
Yeah, my sister pointed that out to me. It's a fairly serious concern. (Coincidentally, that's probably where the term "bird brained" came from...)
Re:Militarizing your backyard with Python, Arduino, and comp... by swordswinger12 on Thursday March 15, 2012 @04:42PM (#3710496)
15:50 for the cannon in action.
Re:Militarizing your backyard with Python, Arduino, and comp... by AngrySkillzz on Thursday March 15, 2012 @05:18PM (#3710664)
Relevant XKCD: http://xkcd.com/382/
Re:Militarizing your backyard with Python, Arduino, and comp... by liquidcool on Friday March 16, 2012 @04:56AM (#3712516)
I wonder if something like the Blender Defender (http://www.plasma2002.com/blenderdefender) would be more effective than the water. A strobe light and/or a rattle to frighten it off. Ultrasonic would be good as well if there was decent evidence it worked.
Re:Militarizing your backyard with Python, Arduino, and comp... by javajosh on Thursday March 15, 2012 @08:41PM (#3711371)
Seems like you'd be better off cutting off the approaches to the feeder. But the project is super cool. For more power, I'd use a power washer. :)
Re:Militarizing your backyard with Python, Arduino, and comp... by polyfractal on Thursday March 15, 2012 @09:04PM (#3711442)
Squirrels are notoriously ingenious at raiding feeders. They are really good at defeating feeders that are specifically designed to be "anti-squirrel" too.
Re:Militarizing your backyard with Python, Arduino, and comp... by Ecio78 on Friday March 16, 2012 @06:49AM (#3712734)
My bro has a problem with a mole digging all the backyard, any idea for that problem? maybe a flying drone that drops bombs on its head ? :)
Re:Militarizing your backyard with Python, Arduino, and comp... by 8ig8 on Thursday March 15, 2012 @10:26PM (#3711662)
The presenter's personal site: http://kurtgrandis.com/blog/
Re:Militarizing your backyard with Python, Arduino, and comp... by mogui on Friday March 16, 2012 @08:26AM (#3712985)
neat and awesome talk