If there’s one thing that never seems to suffer from supply chain problems, it’s litter. It’s everywhere, easy to spot and — you’d think — pick up. Sadly, most of us seem to treat litter as somebody else’s problem, but with something like this machine vision litter mapper, you can at least be part of the solution.
For the civic-minded [Nathaniel Felleke], the litter problem in his native San Diego was getting to be too much. He reasoned that a map of where the trash is located could help municipal crews with cleanup, so he set about building a system to search for trash automatically. Using Edge Impulse and a collection of roadside images captured from a variety of sources, he built a model for recognizing trash. To find the garbage, a webcam with a car window mount captures images while driving, and a Raspberry Pi 4 runs the model and looks for garbage. When roadside litter is found, the Pi uses a Blues Wireless Notecard to send the GPS location of the rubbish to a cloud database via its cellular modem.
Cruising around the streets of San Diego, [Nathaniel]’s system builds up a database of garbage hotspots. From there, it’s pretty straightforward to pull the data and overlay it on Google Maps to create a heatmap of where the garbage lies. The video below shows his system in action.
Yes, driving around a personal vehicle specifically to spot litter is just adding more waste to the mix, but you’d imagine putting something like this on municipal vehicles that are already driving around cities anyway. Either way, we picked up some neat tips, especially those wireless IoT cards. We’ve seen them used before, but [Nathaniel]’s project gives us a path forward on some ideas we’ve had kicking around for a while.
Continue reading “Machine Learning Does Its Civic Duty By Spotting Roadside Litter”
[Jamie] aka [vector76] hit us with a line-tracing plugin for OctoPrint that cuts out whatever 2D shape you draw on a piece of wood. The plugin lets you skip the modeling step entirely, going straight from a CNC-mounted webcam that reads your scribbles and gives you a Gcode toolpath in return. The code is on GitHub and there’s a demo video embedded below.
Under the hood, OpenCV is doing a lot of the image processing, including line detection, and the iterative “find the line” and “move the toolhead” steps really show off what computer vision can do. It starts off with a fiducial arrow for scale and orientation, then it mores the webcam around the scene. The user can enter the usual milling parameters: speeds, feeds, depth of cut, tool offset, milling direction, etc. And then it gets to work.
Right now, it’s limited to paths with non-crossing lines, and probably with good contrast and a nice dark line — all the usual CV restrictions. But mounting a webcam to a CNC toolhead and using it for various pathing problems really opens up tons of possibilities: visual homing, workpiece edge finding, copying parts, custom fitting odd shapes, and more. This project is clearly an invitation to keep on hacking, an appetizer. Once you see the girl pirate robot that [Jamie]’s daughter made, you’ll get the idea.
We’ve seen a similar OpenCV approach used for center-finding bore holes, but while we’ve seen a few webcams used with laser cutters, the CNC mill applications seem largely untapped. Let us know in the comments if you’ve got some other good examples.
Continue reading “You Draw It, CNC Cuts It”
Most of us use our hands to interface with computers, but the human body is capable of many types of input other than that of fingers and feet. But what about people who can’t use their extremities and don’t have a voice? For their sake, it’s time to get creative.
[Michael Paul Coder] has made a way to type simply by blinking in Morse code. Those of you with long memories may recall Lucid Scribe, where he was attempting to document lucid dreaming experiments by detecting rapid eye movements with an accelerometer and triggering his computer to play music. This would in turn notify [Michael] that he was in fact dreaming and was safe to tie a cape around his neck and take a flying leap from a tall building.
Whereas [Michael]’s creation needed a commercial EEG device before, he’s now made it work with just an old webcam thanks to the new trans-consciousness messaging protocol, which operates by using facial detection and then interpreting the amount of changed pixels between video frames. Be sure to check it out in action after the break.
You know how much we love assistive technology around here — just two years ago, the Byte took top honors in The Hackaday Prize.
Continue reading “Morse Keyboard Communicates With The Blink Of An Eye”
We can’t promise it will all be positive, but there’s no question you’ll be getting plenty of attention when you join a video call using the Game Boy Camera. Assuming they recognize you, anyway. The resolution and video quality of the 1998 toy certainly hasn’t aged very well, and that’s before it gets compressed and sent over the Internet.
From a technical standpoint, this one is actually pretty simple, if rather convoluted. [RetroGameCouch] hasn’t modified the Game Boy Camera in any way, he’s just connected it to the Super Game Boy, which in turn is slotted into a Super Nintendo. From there the video output of the SNES is passed through an HDMI converter, and finally terminates in a cheap HDMI capture device. His particular SNES has been modified with component video, but on the stock hardware you’ll have to be content with composite.
The end result of all these adapters and cables is that the live feed from the Game Boy Camera, complete with the Super Game Boy’s on-screen border, is available on the computer as a standard USB video device that can be used with whatever program you wish. If you’re more interested in recovering still images, we’ve recently seen a project that lets you pull images from the Game Boy Camera over WiFi.
Continue reading “Dominate Video Calls With Game Boy Camera Webcam”
Wouldn’t it be nice if every webcam had a hardware switch? Especially for those built-in webcams like the one in your laptop. Since they don’t have switches yet, we’re just stuck trying to remember to turn them off or re-apply the sticker after every meeting. [Becky Stern] was tired of trying to remember to blind the all-seeing eye, and decided to make a robot companion that would do it for her.
Essentially, a servo-driven, 3D-printed eyelid covers the eye’s iris and also the web cam directly underneath. At first, we though [Becky] had liberated the business parts of a cheap webcam and built it into the eyeball, but this is far less intrusive. The eyeball simply sits atop the monitor, and [Becky] can control the eyelid two ways: she can set a timer with the potentiometer to close it automatically after some number of minutes, or else do it on demand using the momentary button. We’d love to see it tied directly to Zoom and or whatever else [Becky] uses regularly. Be sure to check out the build and demo video after the break to see it in action.
We love this cute and friendly reminder that the camera could be watching us. It’s way less creepy than this realistic eyeball webcam that looks around and blinks.
Continue reading “Friendly Webcam Robot Keeps An Eye On Privacy”
It seems like within the last ten years, every other gadget to be released has some sort of heart rate monitoring capability. Most modern smartwatches can report your BPMs, and we’ve even seen some headphones with the same ability hitting the market. Most of these devices use an optical measurement method in which skin is illuminated (usually by an LED) and a sensor records changes in skin color and light absorption. This method is called Photoplethysmography (PPG), and has even been implemented (in a simple form) in smartphone apps in which the data is generated by video of your finger covering the phone camera.
The basic theory of operation here has its roots in an experiment you probably undertook as a child. Did you ever hold a flashlight up to your hand to see the light, filtered red by your blood, shine through? That’s exactly what’s happening here. One key detail that is hard to perceive when a flashlight is illuminating your entire hand, however, is that deoxygenated blood is darker in color than oxygenated blood. By observing the frequency of the light-dark color change, we can back out the heart rate.
This is exactly how [Andy Kong] approached two methods of measuring heart rate from a webcam.
Method 1: The Cover-Up
The first detection scheme [Andy] tried is what he refers to as the “phone flashlight trick”. Essentially, you cover the webcam lens entirely with your finger. Ambient light shines through your skin and produces a video stream that looks like a dark red rectangle. Though it may be imperceptible to us, the color changes ever-so-slightly as your heart beats. An FFT of the raw data gives us a heart rate that’s surprisingly accurate. [Andy] even has a live demo up that you can try for yourself (just remember to clean the smudges off your webcam afterwards).
Method 2: Remote Sensing
Now things are getting a bit more advanced. What if you don’t want to clean your webcam after each time you measure your heart rate? Well thankfully there’s a remote sensing option as well.
For this method, [Andy] is actually using OpenCV to measure the cyclical swelling and shrinking of blood vessels in your skin by measuring the color change in your face. It’s absolutely mind-blowing that this works, considering the resolution of a standard webcam. He found the most success by focusing on fleshy patches of skin right below the eyes, though he says others recommend taking a look at the forehead.
Every now and then we see something that works even though it really seems like it shouldn’t. How is a webcam sensitive enough to measure these minute changes in facial color? Why isn’t the signal uselessly noisy? This project is in good company with other neat heart rate measurement tricks we’ve seen. It’s amazing that this works at all, and even more incredible that it works so well.
More people working from home has had an impact on the cost and availability of USB webcams, so [Jeff Geerling] got around the issue with a DIY solution that rang in around $100. It consists of a Raspberry Pi and HQ camera module acting as a USB webcam, and there is no messy streaming of ffmpeg over the network masquerading as a camera device or anything. It works just as a USB camera should.
[Jeff] chose a Raspberry Pi Zero and HQ camera module for his unit, making a tidy package that might not be quite as small as commercial webcams, but is certainly perfectly respectable as a USB camera. That being said, there are a few drawbacks, namely the lack of a microphone or autofocus, latency issues at higher resolutions, and the need to shut down the Pi cleanly.
Check out the GitHub repository for everything needed to set up your own, including a complete hardware list and some options for mounting. [Jeff] also tested whether the camera would work with the new keyboard-embedded Raspberry Pi 400, and it absolutely does. Embedded below is a video walkthrough and demonstration of the whole project, so check it out.
Continue reading “USB Webcams Out Of Stock? Make One With A Raspberry Pi And HQ Camera Module”