AI is quickly revolutionizing the security camera industry. Several manufacturers sell cameras which use deep learning to detect cars, people, and other events. These smart cameras are generally expensive though, compared to their “dumb” counterparts. [Martin] was able to bring these detection features to a standard camera with a Raspberry Pi, and a bit of ingenuity.
[Martin’s] goal was to capture events of interest, such as a person on screen, or a car in the driveway. The data for the events would then be published to an MQTT topic, along with some metadata such as confidence level. OpenCV is generally how these pipelines start, but [Martin’s] camera wouldn’t send RTSP images over TCP the way OpenCV requires, only RTSP over UDP. To solve this, Martin captures the video stream with FFmpeg. The deep learning AI magic is handled by the darkflow library, which is itself based upon Google’s Tensorflow.
Martin tested out his recognition system with some cheap Chinese PTZ cameras, and the processing running on a remote Raspberry Pi. So far the results have been good. The system is able to recognize people, animals, and cars pulling in the driveway. His code is available on GitHub if you want to give it a spin yourself!
Things rarely go well when humans mix with wildlife. The problems are exacerbated in the suburbs, where bears dine on bird feeders and garbage cans, raccoons take up residence in attics, and coyotes make off with the family cat. And in the suburbs, nuisance wildlife can be an intractable problem because the options for dealing with it are so limited.
Not to be dissuaded in the battle to protect his roses, [dlf.myyta] built this motion-activated sentry gun to apply some watery aversion therapy to marauding deer. Shown in action below against a bipedal co-conspirator, the sentry gun has pretty much what you’d expect under the hood — Raspberry Pi, NoIR camera, a servo for aiming and a solenoid valve to control the water. OpenCV takes care of locating the intruders and swiveling the nozzle to center mass; since the deer are somewhat constrained by a fence, there’s no need to control the nozzle’s elevation. Everything is housed nicely in a plastic ammo can for portability and waterproofing. Any target that stands still for more than three seconds gets a hosing; we assume this is effective, but alas, no snuff films were provided.
We’re not sure if [dlf.myyta]’s code can discern friend from foe, and in this litigious world, hosing the neighbor’s kid could be a catastrophe. Perhaps version 2.0 can include image recognition for target verification.
Continue reading “Auto-Tracking Sentry Gun Gives Deer a Super Soaking”
Thanks to the holiday gifting cycle, many homes are newly adorned with 3D printers. Some noobs are clearly in the “plug and play” camp, looking for a user experience no more complicated than installing a new 2D printer. But most of us quickly learn that adding a dimension increases the level of difficulty substantially, and tinkering ensues.
One such tinkerer, [Marco Reps], has been taking his new Cetus 3D printer to new places, and his latest video offers a trio of tips to enhance the user experience of this bare-bones but capable printer. First tip: adding a heated bed. While the company offers a heated aluminum bed for ABS and PETG printing at a very reasonable price, [Marco] rolled his own. He bolted some power resistors to the aluminum platen, built a simple controller, and used the oversized stock power supply to run everything.
To contain the heat, tip two is an enclosure for the printer. Nothing revolutionary here — [Marco] just built a quick cover from aluminum profiles and acrylic.
But the clear case allows for tip number three, the gem of this video: synchronized time-lapse photography. Unhappy with the jerky time-lapse sequences that are standard fare, he wrote a Python program that uses OpenCV to compare webcam frames and save those that are similar to the last saved frame. This results in super smooth time-lapse sequences that make it look like the print is being extruded as a unit. Pretty neat stuff.
Did you find a 3D printer under your Festivus Pole, and now you’re wondering what’s next? Check out [Tom Nardi]’s guide for 3D newbies for more tips.
Continue reading “Trio of Tips for a Cetus Printer”
All the cool phones now are doing facial recognition. While that sounds like a big job, you can add face detection and recognition easily to your projects if you can support the OpenCV library. [LinuxHint] has a great tutorial that steps you from the basics of OpenCV to actually acquiring and identifying faces. It is aimed at Ubuntu users, but the code would apply to any OpenCV-supported platform. You can also see a less detailed tutorial to learn more about installing OpenCV on the Pi Zero from [DanishMalhotra].
Of course, any facial recognition system is going to need a camera. The nice thing about the first tutorial is that it assumes you know nothing about OpenCV, so it covers the basics on up to using the face-related libraries.
Continue reading “OpenCV Never Forgets a Face”
In July of 2016 a game was released that quickly spread to every corner of the planet. Pokemon Go was an Augmented Reality game that used a smart phone’s GPS location and camera to place virtual creatures into the person’s real location. The game was praised for its creativity and was one of the most popular and profitable apps in 2016. It’s been download over 500 million times since.
Most of its users were probably unaware that they were flirting with a new and upcoming technology called Augmented Reality. A few day ago, [floz] submitted to us a blog from a student who is clearly very aware of what this technology is and what it can do. So aware in fact that they made their own Augmented Reality system with Python and OpenCV.
In the first part of a multi-part series – the student (we don’t know their name) walks you through the basic structure of making a virtual object appear on a real world object through a camera. He 0r she gets into some fairly dense math, so you might want to wait until you have a spare hour or two before digging into this one.
Thanks to [floz] for the tip!
For the last few months we’ve been running The Hackaday Prize, a challenge for you to build the best bit of hardware. Right now — I mean right now — you should be finishing up your project, crossing your t’s and dotting your lowercase j’s. The last challenge in the Prize ends tomorrow. After that, we’re going to pick 20 finalists for the Anything Goes challenge, then send the finalists off to our fantastic team of judges. Time to get to work! Make sure your project meets all the requirements!
It’s been a few weeks, so it’s time to start talking about Star Trek. I’m paying ten dollars a month to watch Star Trek: Discovery. I was going to pay that anyway, but I think this might actually be worth it. Highlights include Cardassian voles and Gorn skeletons. Also on the Star Trek front is The Orville, [Seth MacFarlane]’s TNG-inspired show. The Orville has far surpassed my expectations and is more Star Trek than Discovery. Leave your thoughts below.
It’s a new edition of Project Binky! Two blokes are spending years stuffing a 4WD Celica into a Mini. It’s the must-watch YouTube series of the decade.
AstroPrint now has an app. If you’re managing a 3D printer remotely and you’re not using Octoprint, you’re probably using AstroPrint. Now it’s in app format.
Have fifty bucks and want to blow it on something cool? A company is selling used LED display tiles on eBay. You get a case of ten for fifty bucks. Will you be able to drive them? Who knows and who cares? It’s fifty bucks for massive blinkies.
[Peter] is building an ultralight in his basement. For this YouTube update, he’s making the wings.
Oh it’s deer season, so here’s how you make deer jerky.
If you’re messing around with Z-Wave modules and Raspberry Pis, there’s a contest for you. The grand prize is an all-expense paid trip to CES2018 in Las Vegas. Why anyone would be enthusiastic about a trip to CES is beyond me, but the Excalibur arcade has Crazy Taxi, so that’s cool.
Go is the language all the cool kids are using. GoCV gives Go programmers access to OpenCV.
We see a lot of Raspberry Pis used to play games, but this is something entirely different from the latest RetroPie build. This Raspberry Pi is learning how to read playing cards, with the goal of becoming the ultimate card counting blackjack player.
If [Taxi-guy] hasn’t named his project Rain Man, we humbly suggest that he does so. Because a Pi that can count into a six-deck shoe would be quite a thing, even though it would never be allowed anywhere near a casino. Hurdle number one in counting cards is reading them, and [Taxi-guy] has done a solid job of leveraging the power of OpenCV on a Pi 3 for the task. His description in the video below is very detailed, but the approach is simple: find the cards in a PiCam image of the playing field using a combination of thresholding and contouring. Then, with the cards isolated, compare the rank and suit in the upper left corner of the rotated card image to prototype images to identify the card. The Pi provides enough horsepower to quickly identify an arbitrary number of non-overlapping cards; we assume [Taxi-guy] will have to address overlapping cards and decks that use different fonts at some point.
We’re keen to see this Pi playing blackjack someday. As he’s coding that up, he may want to look at algorithmic approaches to blackjack strategies, and the real odds of beating the house.
Continue reading “A Raspberry Pi Rain Man in the Making”