Getting a textured 3D scan from just a webcam

Here’s an oldie but a goodie that passed us up the first time it went around the Internet. [Qi Pan], (former) PhD student at Cambridge, made a 3D modeling program using only a simple webcam. Not only does this make very fast work of building 3D models, the real texture is also rendered on the virtual object.

The project is called ProFORMA, and to get some idea of exactly how fast it is, the model of a church seen above was captured and rendered in a little over a minute. To get the incredible speed of ProFORMA, [Qi] had his webcam take a series of keyframes. When the model is rotated about 10°, another keyframe is taken and the corners are triangulated with some very fancy math.

Even though [Qi]’s project is from 2009, it seems like it would be better than the ReconstructMe, the Kinect-able 3D scanning we saw a while ago. There’s a great video of [Qi] modeling a papercraft church after the break, but check out the actual paper for a better idea of how ProFORMA works.

[Read more…]

Detecting ASCII art across the Internet

As a web developer and designer, [Victor] has a habit of putting a very nice ASCII signature in an HTML comment at the top of every web page he designs. He was inspired by seeing others do this,  and this piqued his curiosity to see who else was doing this. His idea was to scan through a chunk of the Internet and see what other web pages had ASCII signatures in an HTML comment. With a lot of very clever work, [Victor] managed to grab some interesting ASCII art that would have been missed without looking at the source of millions of web pages.

After gathering a list of the top million top-level domains from Alexa, [Victor] wrote a script to download the HTML for all the pages in parallel. After that, it was just an issue of detecting the ASCII art in all the HTML files. There were a few earlier ASCII art detection algorithms, but nothing that suited [Victor]’s use case. The best result came from only looking at the first comment (otherwise the signatory wouldn’t want you to find it with a quick glance at the source) that were at least 3 lines long and 40 characters wide. After discarding everything with HTML tags in it, [Victor] had an awesome gallery of the ASCII art from webpages all around the Internet.

What did he find? Well, there’s far too many ASCII signatures for [Victor] to put up on his webpage, but he did provide a nice sample of what he found. They’re mostly logos, although there is a Hypnotoad and Aperture Science sentry turret in there.

If you’d like to try out [Victor]’s script, he made everything available on GitHub.

Finding the average of every font

An old book – the smell, the texture of the slowly rotting paper, and the smudges and margin notes accrued over decades – is one of the finer points in life taken for granted much too often. We’re bombarded with high precision vector typefaces all day, but [Dan]’s Avería font is beautiful in its irregularity. [Dan] made a font that is the average of all the fonts installed on his computer, and the result looks surprisingly great.

[Dan] started his journey down the generative font path by making images of every letter of all his fonts and mashing them together with a PHP script. The result was a terribly blurry font, and unfortunately this had been done before. [Dan] wanted a font with clearly defined edges, though, so the obvious solution would be to take the grayscale result of his first experiment, set a threshold, and make a monochromatic image. This plan didn’t pan out, and [Dan] needed a cleverer way to go about things.

The solution to the problem is astonishingly simple; [Dan] took the perimeter of each font glyph and divided it into hundreds of points. These points could then be averaged in 2D space making a real ‘average’ font.

Even though this project isn’t the usual ‘Arduino doing something’ fare, [Dan] came up with a really clever way of doing something that produced something really cool. It’s enough of a hack in our books. Tip ‘o the hat to [Aleks Clark] for sending this one in.

Emulating ARM on an 8-pin AVR

Falling on the heels of some fabulous ‘lets see what we can emulate on an AVR’ builds we’ve seen, [Dimitri] emulated an ARM Cortex-M0 on an 8-pin ATtiny85.

The emulator is written entirely in AVR assembly. Unfortunately, the instruction set of ATtinys don’t have a multiply instruction, so that had to emulated in a separate piece of code. Even with this addition, the emulator is very small; the core is just over 1300 instructions and small enough to fit on the Flash of the very small ‘tiny85.

Unlike the ATMega running Linux we saw last month, [Dimitri] won’t be doing anything crazy like making the tiniest and worst Linux computer ever. The Cortex-M0 doesn’t have a MMU, so Linux is out of the question. [Dimitri] could go with μCLinux, with the addition of a I2C EEPROM and RAM, but don’t expect a speed demon for an emulated ARM running at 200kHz.

[Dimitri] put all the code up on his webpage, and the installation is just running ‘make.’  It looks easy enough to get up and running very quickly, so we’re sure some bored hardware guru will come up with something interesting to do with this code.

Playing Zork on the Arduino

If you’re looking for something to do on a boring Sunday afternoon, how about dusting off your Arduino and playing a text adventure? [Louis] wrote in to tell us about his project called AZIP, an app that will let you play classic 1980s text adventures on your Arduino.

The famous Infocom text adventure games such as Zork and Hitchhiker’s Guide to the Galaxy (reputed to be better than the book, by the way) all ran on a virtual machine called a ZMachine. We’ve seen a few unsuccessful attempts to run a ZMachine on an Arduino, but these builds usually end up going with a Linux-based single board computer. As far as we’re aware, [Louis]’ build is the first time classic text adventures have been available on the Arduino.

[Louis] based his build on the popular Jzip ZMachine. The required hardware is fairly minimal – just an Arduino with an SD card. Right now the limitations of Flash and RAM on the Arduino means [Louis] needed to remove the game save and restore functions, but with a little clever coding and continued development those functions can be restored. Very cool indeed.

QArt codes, the better way to put picture in a QR code

[Russ Cox], current Googler and formerly of Bell Labs, posted an awesome guide to putting images in a QR code. Unlike this terrible attempt I wrote last August, [Russ]’s method does much more than simply paste an image into a QR code and hope the error correction passes. This new method generates a unique URL to be encoded for each QR code. In other words, the embedded image is actually part of the QR code and not just a copy and paste attempt.

The basis of [Russ]’ hack is the ability to change the message contained in a QR code to be made of either ASCII/UTF-8 or decimal numbers coded as binary. By appending an anchor tag (i.e. http://swtch.com/pjw/#123456789...) to the URL that will be encoded, [Russ] can change a whole bunch of pixels in a QR code to make just about any image.

With a few tricks like building new Reed-Solomon encoded blocks, [Russ] can change where in the pixels required by the QR code are placed. This allows for the full-width image of PJW’s binary likeness to be displayed in the QR code.

[Russ] put up a QArt coder that allows anyone to put a pixelated image in any QR code. [Luke Shumaker] (thanks for sending this in, [Luke]) took this tool and put the ‘ol skull ‘n wrenches inside a QR code pointing to hackaday.com. Very nice work from [Russ], and puts my work to shame. I’ll go cry in a corner now.