Stereo Vision and Depth Mapping with Two Raspi Camera Modules

The Raspberry Pi has a port for a camera connector, allowing it to capture 1080p video and stream it to a network without having to deal with the craziness of webcams and the improbability of capturing 1080p video over USB. The Raspberry Pi compute module is a little more advanced; it breaks out two camera connectors, theoretically giving the Raspberry Pi stereo vision and depth mapping. [David Barker] put a compute module and two cameras together making this build a reality.

The use of stereo vision for computer vision and robotics research has been around much longer than other methods of depth mapping like a repurposed Kinect, but so far the hardware to do this has been a little hard to come by. You need two cameras, obviously, but the software techniques are well understood in the relevant literature.

[David] connected two cameras to a Pi compute module and implemented three different versions of the software techniques: one in Python and NumPy, running on an 3GHz x86 box, a version in C, running on x86 and the Pi’s ARM core, and another in assembler for the VideoCore on the Pi. Assembly is the way to go here – on the x86 platform, Python could do the parallax computations in 63 seconds, and C could manage it in 56 milliseconds. On the Pi, C took 1 second, and the VideoCore took 90 milliseconds. This translates to a frame rate of about 12FPS on the Pi, more than enough for some very, very interesting robotics work.

There are some better pictures of what this setup can do over on the Raspi blog. We couldn’t find a link to the software that made this possible, so if anyone has a link, drop it in the comments.

A Full IP Webcam With a Raspberry Pi

A Dropcam will run you about $150. Price out a Raspberry Pi, camera sensor, and a CCTV camera housing found on eBay, and it starts to look like there may be a cheaper replacement for a Dropcam sitting around on workbenches, if only someone can figure out the software. [Antoine] did just that, giving any Raspberry Pi the ability to stream H.264 video over a network.

[Antoine]’s software is based on the raspivid tool distributed from the foundation, but that only takes care of capturing and encoding H.264 video from the camera sensor. To add IP camera support, the Live555 RTSP library was mixed in and combined to stream video over the Raspi’s network connection.

With a camera dome enclosure from the usual outlets, [Antoine]’s project really starts to look professional. The specs are respectable, too: it can output a 1080 stream, and with a small modification to an Ethernet cord, this webcam has PoE. Future updates include the ability to record videos based on a trigger and possibly a webserver on the Pi for configuration. [Antoine] says he really isn’t up to speed with Javascript, so any help would be appreciated.

Turning the Raspberry into a CAD Workstation

Inventables has been working hard on a successor to the extremely popular Shapeoko CNC milling machine, and to bring digital fabrication to the masses, they’ve created Easel, possibly the easiest 3D design software you’ll ever use. [Sacha] was trying out the beta version of Easel and mentioned to the dev mailing list he was running his installation on a Raspberry Pi. One of the developers chimed in, and after a bit of back and forth we now have a workflow to use Easel with the Raspberry Pi.

Easel is a web app, but since the graphics, design, and g-code generation are handled locally, even the most rudimentary CAD suite would choke the decidedly low power Raspi. Instead, [Sacha] is using the Raspberry to grab 2D and 3D files, turn that into g-code for a machine, and send it off to a Shapeoko router.

Easel doesn’t yet have local sender support that works on Linux, so a separate piece of software is used to shoot the g-code over a serial port to the machine. That’s something that will probably be added in a later version of Easel, making a Raspberry Pi a great way to control router or milling machine.

Delicious Dash Pi Driving Data

A few weeks ago, [sentdex] described how Python has changed his life. In particular, it has allowed him to mine Bitcoin automatically, teach other people programming, and realize a full in-car computer for less than $100 using a Raspberry Pi.

It’s based on a model B, which he’s enclosed in a beefy Pi camera case  that sits on the dash of his Honda S2000. The screen is a $17 internet special with composite in, which keeps the BOM way down. A 3A switch wired into the ignition ensures that power to the Pi is not rudely interrupted.

A script takes the Pi directly into desktop mode when [sentdex] starts the car. His main goals for the project were setting up a dash cam and communicating with the OBD computer. The Pi pulls various data points including the throttle position, and the user moves through the list with the arrow keys of one of those roll-up keyboards.

In the future, he’d like to upgrade it to live graph the throttle position and add a sensor to show the brake position. Be sure to check out the walk-through/demonstration video after the break.

Continue reading “Delicious Dash Pi Driving Data”

Raspberry Pi Brings New Life to Some Old Dinosaurs

Reprogramming the behaviors of a person-sized animatronic dinosaur would have to be among the coolest opportunities to be presented with… This is exactly what [Dr. Lucy Rogers] and a group of fellow techies were tasked to accomplish for the Blackgang Chine park located on the Isle of Wight in the UK.

dino1Before the group arrived, the native dinos didn’t do much else than run a preprogrammed routine when triggered by someone’s presence… which needless to say, lacks the appropriate prehistoric dynamism. Seeing that their dated wag, wiggle, and roar response could use a fresh breath of flair, the park’s technical projects coordinator [Mark Butler] began adapting one of the dinosaur’s control boxes to work with a Raspberry Pi. This is when [Lucy] and her group were called upon for a two-day long excursion of play and development. With help and guidance from Raspberry Pi expert, [Neil Ford], the group learned how to use a ‘drag and build’ programing environment called node-RED in order to choreograph new movement sequences for two of the smaller dinosaurs provided for use. The visual nature of node-RED helped those of the Blackgang staff with little programming experience understand the code at work, which aided in their training. Now they can reprogram the dinosaurs with new actions on the fly if needed.

The Pi in the end turned out to be a cost-effective solution which will give the robot dinosaurs a longer, more fulfilling lifespan to roar and frolic on their island home. Check out this video by [Debbie Davies] to see more…

Thanks Ed, for spotting this one!

Continue reading “Raspberry Pi Brings New Life to Some Old Dinosaurs”

Simple LED Project to Spice Up Your Halloween Party

[Paul’s] project is a great example of how you can take a simple project and turn it into something more interesting. He built himself a jack-o-lantern with an Internet controlled RGB LED embedded inside.

[Paul] first wired up an RGB LED to a Raspberry Pi. He was sure to wire up each color using a 100ohm resistor to prevent the LED from burning out. The web interface was written in Python. The interface is pretty simple. It consists of three text fields. The user enters a value between 0 and 255 for each of the three LED colors. The program then lights up the LED accordingly.

[Paul] realized he would need a diffuser for the LED in order to really see the blended colors properly. Instead of using a common solution like a ping-pong ball, he opted to get festive and use a plastic jack-o-lantern. [Paul] removed the original incandescent bulb from the lantern and mounted the LED inside instead. The inside of the pumpkin is painted white, so it easily diffuses the light. The result is a jack-o-lantern that glows different colors as defined by his party guests. Be sure to check out the demonstration video below.

What’s Next on the Raspberry Pi Front

Raspberry Pi founder [Eben Upton] recently sat in an uncomfortable chair in London to discuss all things Pi. Having sold about four million units over the last 2.5 years, he feels the future is bright for his original vision of inspiring and helping kids to learn programming.

[Eben] is quite pleased with the Pi-Top, a B+ based laptop kit that’s pulling in backers left and right while completely unaffiliated with the Pi foundation. The kit includes a 13.3″ HD LCD screen, keyboard, trackpad, and an injection molded case, though you can print your own with the included STL files. Kits start at $249 without a Pi and $285 with a B+ included. Robot and home automation HATs are also available separately or bundled with the Pi-Top kit.

The most exciting news is that the $600,000 spent on DSI connectors for those four million Raspis is about to pay off. [Eben] hopes that an official touchscreen will be available for purchase before the end of 2014 or in early 2015. He showed off a 7″ capacitive touch panel that will attach to a display board stacked on a Pi, effectively turning it into a tablet.

[Eben] said that they will not be making a Model C and instead are working on revision A+. He hopes to make an official announcement in the near future.

Finally, [Eben] discussed the importance of community, which played a large part in the birth and evolution of the Pi. He also spoke of Pi Academy, a sort of professional workshop for teachers in the UK who’ve recently been tasked with teaching computer science as demanded by changes in the mandatory UK school curriculum. He hopes that these 2-day seminars will help educators achieve the high expectations recently laid out for students to achieve by age ten.