Last weekend wasn’t just about Maker Faire; in Stockholm there was another DIY festival celebrating the protocols that make electronic music possible. It’s MIDI Hack 2014, and [Kristian], [Michael], [Bram], and [Tobias] put together something really cool: a Lego sequencer
The system is set up on a translucent Lego base plate, suspended above a webcam that feeds into some OpenCV and Python goodness. From there, data is sent to Native Instruments Maschine. There’s a step sequencer using normal Lego bricks, a fader controlling beat delay, and a rotary encoder for reverb.
Despite being limited to studs and pegs, the short demo in the video below actually sounds good, with a lot of precision found in the faders and block-based rotary encoder. [Kristian] will be putting up the code and a few more details shortly. Hopefully there will be enough information to use different colored blocks in the step sequencer part of the build for different notes.
Continue reading “Turning Lego Into A Groove Machine”
Even for hobby projects, iteration is very important. It allows us to improve upon and fine-tune our existing designs making them even better. [Max] wrote in to tell us about his latest posture sensor, this time, built around a webcam.
We covered [Max's] first posture sensor back in February, which utilized an ultrasonic distance sensor to determine if you had correct posture (or not). Having spent time with this sensor and having received lots of feedback, he decided to scrap the idea of using an ultrasonic distance sensor altogether. It simply had too many issues: issues with mounting the sensor on different chairs, constantly hearing the clicking of the sensor, and more. After being inspired by a very similar blog post to his original that mounted the sensor on a computer monitor, [Max] was back to work. This time, rather than using an ultrasonic distance sensor, he decided to use a webcam. Armed with Processing and OpenCV, he greatly improved upon the first version of his posture sensor. All of his code is provided on his website, be sure to check it out and give it a whirl!
Iteration leads to many improvements and it is an integral part of both hacking and engineering. What projects have you redesigned or rebuild? Let us know!
[Courtney] has been hard at work on OSkAR, an OpenCV based speaking robot. OSkAR is [Courney's] capstone project (pdf link) at Shepherd University in West Virginia, USA. The goal is for OSkAR to be an assistive robot. OSkAR will navigate a typical home environment, reporting objects it finds through speech synthesis software.
To accomplish this, [Courtney] started with a Beagle Bone Black and a Logitech C920 webcam. The robot’s body was built using LEGO Mindstorms NXT parts. This means that when not operating autonomously, OSkAR can be controlled via Bluetooth from an Android phone. On the software side, [Courtney] began with the stock Angstrom Linux distribution for the BBB. After running into video problems, she switched her desktop environment to Xfce. OpenCV provides the machine vision system. [Courtney] created models for several objects for OSkAR to recognize.
Right now, OSkAR’s life consists of wandering around the room looking for pencils and door frames. When a pencil or door is found, OSkAR announces the object, and whether it is to his left or his right. It may sound like a rather boring life for a robot, but the semester isn’t over yet. [Courtney] is still hard at work creating more object models, which will expand OSkAR’s interests into new areas.
Continue reading “Never Lose Your Pencil With OSkAR on Patrol”
Need a quick and easy way to sort through a few hundred random resistors? You could do them one at a time by reading the color codes yourself… or you could get a machine to do it for you!
When [Robert] was faced with a pile of unsorted resistors he quickly decided he did not have the patience to sort them manually. So, he started by writing an Android app using OpenCV to detect and identify resistor color codes. The problem is, most phones have trouble focusing at short distances — and since resistors are so small, holding the phone farther back results in color rings only being a few pixels wide — not the greatest for image recognition!
So, he started again on his computer, using a cheap LED-lit webcam instead. He wrote the app in java so he could re-use parts of the code from the Android app. It seems to work pretty well — check it out in the following video! This would be perfect to pair up with your illuminated storage bin hack.
Continue reading “ReSCan — Automated Resistor Identification!”
[Matthiew] needed to create a system that would allow a computer to read braille. An electromechanical system would be annoying to develop and would require many hardware iterations as the system [Matthew] is developing evolves. Instead, he came up with a much better solution using a webcam and OpenCV that still gets 100% accuracy.
Instead of using a camera to look for raised or lowered pins in this mechanical braille display, [Matthiew] is using OpenCV to detect the shadows. This requires calibrating the camera to the correct angle, or in OpenCV terms, pose.
After looking at the OpenCV tutorials, [Matthiew] found a demo that undistorts an image of a chess board. Using this same technique, he used fiducials from the ARTag project to correctly calibrate an image of his mechanical braille pins.
As for why [Matthiew] went through all the trouble to get a computer to read braille – something that doesn’t make a whole lot of sense if you think about it – he’s building a braille eBook reader, something that just screams awesome mechanical design. We’d be interested in seeing some more info on that project as well.
[Stephen] has just shared with us the current progress of his night vision vehicle system, and it’s looking quite promising!
The idea of the project is to provide the driver with a high contrast image of the road, pedestrians and any other obstacles that may not be immediately visible with headlights. It’s actually becoming a feature on many luxury cars including BMW, Audi, GM and Honda. This is what inspired [Stephen] to try making his own.
The current system consists of an infrared camera, two powerful IR light spot lights, and a dashboard LCD screen to view it. It may be considered “not a hack” by some of our more exuberant readers, but [Stephen] does such a great job explaining his future plans for it, which include object recognition using OpenCV, so we felt it was more than worth a share, even at this point.
You see, the idea of vehicle night vision is not to constantly watch a little screen instead of the road — it’s designed to be there when you need it — and to let you know when you need it, [Stephen's] planning on adding a Raspberry Pi to the mix running OpenCV to detect any anomalies on the road that could be of concern. We shudder at the amount of training a system like that might need — well, depending on the complexity of this image recognition.
Anyway, stick around after the break to hear [Stephen] explain it himself — it is a long video, but if you want to skip to the action there are clips of it on the road at 1:53 and 26:52.
Continue reading “The Beginning of a DIY Vehicle Night Vision System”
[Shane Ormonde] recently learned how to measure distance using just a webcam, a laser, and everyone’s favorite math — trigonometry. Since then he’s thrown the device onto a stepper motor, and now has a clever 2D room mapping machine.
He learned how to create the webcam laser range finder from [Todd Danko], a project we featured 7 years ago! It’s a pretty simple concept. The camera and laser are placed parallel to each other at a known distance, axis-to-axis. On the computer, a python script (using the OpenCV library) searches the image for the brightest point (the laser). The closer the brightest point is to the center of the image, the farther the object. Counting pixels from the center of the image to the laser point allows you to calculate an angle, which can then be used to calculate the distance to the object — of course, this needs to be calibrated to be at all accurate. [Shane] does a great job explaining all of this in one of his past posts, building the webcam laser rangefinder.
From there it was just a matter of slapping the rangefinder onto a stepper motor, driving it with a small PIC, and running the calculations on the fly! His results are fairly impressive.
Continue reading “2D Room Mapping With a Laser and a Webcam”