Removing Fisheye Distortion

fisheye

Reader [alex] had a commercial plugin for fisheye lens correction and wondered exactly what kind of magic was behind it. Was it actually doing line detection? He dropped in a square grid to see what it spit out. The warped result indicated that the transformation was completely independent of the photo’s content. Using this result as a guide he was able to create a similar transform using Warp and save it as a script. The script generates almost identical results and now he knows exactly how little magic is involved.

7400 Series Logic Simulator

logic

Atanua is a real time logic simulator to help people learn some of the basics of electronics. Focusing mainly on logic, as opposed to power, this is a fantastic tool to learn with. They have done a fantastic job of making it easy to use as well as good looking. We can see this as being a must have piece of software for any hacker. There is a free version available as long as you aren’t using it commercially.

[Thanks ellisgl]

PS3 Home Hacking

ps3

Last week Sony launched the public beta of Home, their virtual world for the PlayStation 3. It wasn’t met with much fanfare and has proven to be quite buggy. Many were less than charmed by scarcity being ported to the virtual world. Others took it upon themselves to hack the service. Connections between the user’s home console and Sony’s server are unencrypted. You can sniff the requests and responses off the wire and modify them live. It seems you need the console to establish the initial connection, but after that you’re free to use builtin tools like Download.jsp, UploadFileServlet, and Delete.jsp to modify any file on the host server. You can also set up a proxy server to modify content, but that will only affect what your console sees.

[photo: nic0]

[via Joystiq]

MINI’s Augmented Reality Ad

miniaugmented

We were surprised last month when we saw augmented reality being done completely in flash. It hasn’t taken too long to go mainstream though. MINI has incorporated it into a recent German language magazine ad campaign. The fiduciary marks actually work quite well with MINI’s established ad format. Visit the ad’s URL and hold the magazine up to the webcam and a 3D model of the MINI Cabrio will appear. They have a PDF of the ad that you can print and use if you don’t have the original. Unfortunately, it doesn’t seem to have cross-platform support.

[via Autoblog]

Simulated Annealing

annealing

Here’s an update on our earlier post about genetic programming. Altered Qualia has posted a new implementation of [Ron Alsing]’s idea. It starts with 50 polygons and then randomly changes one parameter with each optimization step. If the the change results in fewer differences from the target image, it’s kept as the new best DNA. This search method is similar to simulated annealing. The image above is the result of 1500 good mutations out of 35900 possible. The implementation lets you choose any image, but smaller means the fitness calculation is faster. It’s written in JavaScript using the <canvas> environment. You’ll definitely get better performance using newer browser builds.

[Original image by R Stevens]

[via Waxy]

WordPress 2.7 Upgrade In One Line

wordpress

BadPoetry WordPress 2.7 has just been released and features a complete interface overhaul. Hack a Day runs on WordPress MU hosted by WordPress.com, so we got this update last week. We run standard WordPress.org on all of our personal blogs though. We recommend it because it’s free, has a massive userbase, and if you host it yourself, you can do whatever you want with it.

To make the upgrade process as simple as possible (and for the sheer rush of ‘rm -rf’), we use a one line command.

$ curl http://wordpress.org/latest.zip -o "wp.zip" && unzip wp.zip && rm -rf ./wordpress/wp-content/ && cp -r ./wordpress/* ~/www/

curl downloads the latest version from wordpress. unzip unpacks all of the files into a directory called ‘wordpress’. rm -rf removes everything in the ‘wp-content’ directory. Otherwise, you will overwrite your images, themes, and plugins. cp -r copies everything to your http document root, overwriting the previous install.

Naturally, you should back up your current install and database beforehand. We tend to use the one-liner with reckless abandon. If you’re wondering about the terseness, it was designed to fit inside the 140 character limit of Twitter.

[Thanks, Chris Finke]

Genetic Programming

monalisa

[Ron Alsing] wanted to try out some genetic programming, so he created a simple test problem: Could you render the Mona Lisa using just 50 semitransparent polygons? The program starts with a random DNA sequence. It then mutates and compares itself to the original image. If the mutation is closer, it becomes the new sequence. The final image he shows looks pretty good after 904,314 iterations.

[prunesquallor] pointed out a genetic algorithm project of his own. It’s a flash program to evolve a car. The car tries to get as far as possible on a set terrain without the passenger circles hitting the ground. The wheel size and positions can change along with the spring length, constant, and damping. A graph tracks the best performance along with the mean. He’s planning on building a version that lets you change the parameters.

[via Waxy]