Bookworm Playing Bot Tests Programmer’s OCR Skills

bookworm-bot

Check out this brainy bot with [Jari] whipped up to dominate the Bookworm Deluxe scoreboard. The bot runs on top of a win32 machine, pulling screenshots to see the game board and simulating mouse clicks to play. The video after the jump shows that it plays like a champ, but it took some doing to get this far and [Jari] took the time to share all of the development details.

The hardest part of writing these types of bots is recognizing the game pieces. Check out all of the animation that’s going on in the still shot above… a lot of the tiles are obscured, there are different colors, and the tiles themselves shift as the bot spells and submits each word.

After some trial and error [Jari] settled on an image pre-processor which multiplies pixel values by themselves four times, then looks at each pixel with a 1/6 threshold to produce a black and white face for each tile. From there a bit of Optical Character Recognition compares each tile to a set of known examples. This works remarkably well, leading into the logic and dictionary part of the programming challenge.

Do you think this was easier or harder than the Bejeweled Blitz bot. That one was looking for specific pixel regions, this one is basically a focused roll-your-own OCR script.

 

Continue reading “Bookworm Playing Bot Tests Programmer’s OCR Skills”

Panning GoPro Mount Catches Bad Drivers On Video

gopro-mount

[Chris] must live in a neighborhood with a lot of bad drivers. He built this motorized panning GoPro mount so he can record and share his neighbors’ mobile misadventures with the world. He started with a custom machined aluminum frame. The frame clips onto a suction cup mount grab bar. The stock GoPro mount sits on a machined HDPE puck, which is rotated by a NEMA 11 stepper motor. [Chris] used a Pololu A4988 stepper motor driver to handle the coils. Initially he used an Arduino to generate pulses for the stepper driver. A true Hackaday fan though, he decided that an Arduino was overkill, and broke out a 555 timer. A DPDT switch powers up the 555 and controls the stepper driver’s direction input. The electronics all fit neatly in a small project box which doubles as a hand controller.

While setting up for a test drive [Chris] found that he could only lock down one suction cup on his car’s curved sunroof. Considering the light weight of the GoPro, one suction cup is probably enough. Just to be safe, [Chris] added a rope leash down through the sunroof.

We think the stepper motor was a good choice for this project. Since the motor is direct drive, there are no gears to strip. The stepper’s holding torque also keeps the camera pointed in the right direction at highway speeds. With no wires directly connecting the GoPro to the car, [Chris] can spin the camera 360 degrees without worrying about tangles. Verifying the camera’s direction is just a matter of looking up through the car’s sunroof. Click past the break to see [Chris’s] camera mount in action. 

Continue reading “Panning GoPro Mount Catches Bad Drivers On Video”

An Open Source IPad Display Adapter

Those fancy 2048×1536 pixel resolution displays found in the iPad 3 and 4 can be used for much more than high def Candy Crush and Netflix viewing. [Freddie] over in Southampton, UK built his own adapter to connect these high-resolution LCD panels to anything with a DisplayPort connection. It’s called OSCAR, and it’s the open source way to add a whole lot of pixels in a second (or third, or fourth….) monitor.

The LCD panels found in the iPad 3 and 4 don’t use the usual LVDS connection found in just about every other LCD panel ever made. It uses an extension of the DisplayPort protocol, meaning any graphics card with one of these ports already does the heavy lifting for this panel. The only other thing that’s needed is an adapter to control the power and backlight, which is easily handled by an ATMega32U4. This makes OSCAR Arduino compatible, making it easy to add sensors and USB playthings.

OSCAR is available on Kickstarter for £65 (~$100 USD) for the board itself. Adding to that, you’ll need to grab an iPad retina display through the usual channels for about $65. Not exactly cheap, but try finding another better-than-1080p display for that price.

We Salute The Television Tube Flag

From [Gijs] comes Beeldbuis Vlag Tijsdlijn, or television tube flag (Translated). We’re not up on our Dutch, but it appears that [Gijs] and friends have created a television tube which waves much like a flag in response to airflow from a fan.  The effect is pretty darn amazing, and that’s putting it mildly. To create this hack, [Gijs] built a modified Wobbulator. The Wobbulator is an early video synthesizer which used added steering coils to modify the operation of a standard TV tube. When excited, the coils would deflect the tube’s electron beam, causing some rather trippy images to appear on-screen. (Yes, here at Hackaday “trippy” is a scientific term).

[Gijs] wanted his screen to be “waved” by a fan, just like a flag would wave. To do this he used an anemometer made of ping-pong ball halves. The anemometer spins up a DC motor from a CD-ROM drive. In this application, the motor acts as a generator, creating a DC voltage. An ATmega328 running the Arduino code reads the voltage from the motor. If the anemometer is spinning, the Arduino then outputs a sinusoidal value. The Arduino’s output is amplified and applied to the coil on the CRT. A network of power resistors ensures the amplifier is correctly loaded. The results speak for themselves. In the video after the break, the tube flag is displaying a slide show of photographs of its construction. As an added hack, [Gijs] used an Arduino Leonardo as a USB keyboard. When the anemometer spins, the primary ATmega328 sends a signal to the Leonardo, which then emulates a push of the arrow keys on the host computer. This lets the tube flag advance its own images. Very cool work indeed!

Continue reading “We Salute The Television Tube Flag”

Lichtspiel Crosses Board Games With Video games

Lichtspiel

Video games are amazing these days. Cinemagraphic game play, incredible accelerated graphics, you name it. The average tabletop board game though, has not received the benefit of all this technology. [Marcel] hopes to provide some options for changing that with Lichtspiel, an Interactive Digital Boardgame. Lichtspiel uses a Philips Pico-Beamer projector to project the game board onto a white surface. A camera (either a Raspberry Pi camera module or a Logitech USB webcam) then picks up the players interactions with the game board. Actual interaction is done with small black chips. When a player moves their chip, the vision system sends the x,y coordinates main processor. The game then changes based upon the chip position. [Marcel’s] video shows two demonstrations, a matrix style board game simulation for two and a co-operative asteroids style game. In the asteroids style game one player moves the ship while the other aims the weapons.

We can’t help but see the similarities between this system and the board game demos for castAR , though we feel they fill different niches. Lichtspiel does away with 3D, and by doing so doesn’t require projection glasses to play. Lichtspiel definitely has possibilities. We’d love to see [Marcel] open up his software design so that it can be further developed.

Continue reading “Lichtspiel Crosses Board Games With Video games”

The Beginning Of A DIY Vehicle Night Vision System

night vision car

[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”

Reverse Engineering An HDMI Extender

There’s a number of devices out there that extend HDMI over IP. You connect a video source to the transmitter, a display to the receiver, and link the two with a CAT5/5e/6 cable. These cables are much cheaper than HDMI cables, and can run longer distances.

[Daniel] didn’t care about extending HDMI, instead he wanted a low cost HDMI input for his PC. Capture cards are a bit expensive, so he decided to reverse engineer an IP HDMI extender.

After connecting a DVD player and TV, he fired up Wireshark and started sniffing the packets. The device was using IP multicast on two ports. One of these ports had a high bitrate, and contained JPEG headers. It looked like the video stream was raw MJPEG data.

The next step was to write a listener that could sniff the packets and spit the data into a JPEG file. After dealing with some quirks, JPEG images could be saved from the remote device. Some more code was needed to have the computer initiate the streaming, and to extract audio from the second port.

In the end, video capture with the low cost device was possible. [Daniel] also provided a bonus teardown of the device in his writeup.