Monthly Archive for September, 2007

Content Aware Image Resizing

So say you want to include embed an image into your web page, like this one of my dad taken by my step-mom:

It’s not a bad image, but doesn’t quite have the same impact in this scaled down form factor. It would be nice if you could make my dad a little bit bigger. You could crop the image but then you lose the interesting expanse of the background. There is another technique… called content-aware image resizing that performs seam carving on the image. You might have seen the video created by the algorithms creators a while back. Since their paper was published various implementations have cropped up, including this Liquid Rescale plugin for GIMP by Carlo Baldassi. It works much like you would expect; create some additional layers with masks for important and unimportant features of the image, pick a target size, and go.

By not being too aggressive this is what I came up with:

I messed up the mask on his left foot so it started to distort and there is still a tiny trace of red from the date. Obviously this totally changes the aspect of features if you scroll and compare the two images, but that’s not important here. The goal is to produce an image for the target size (in this case 474 pixels wide) while maintaining the features and important information of the original image.

It works in the reverse direction, too:

It’s really fun to play with and it’s Free/Open Source Software, too!

Making Internet Radio Pretty

Aaron Bockover has been working on a nice patch for Banshee that allows for better parsing of the title metadata found in most shoutcast/icecast/etc internet radio streams, such as those from SomaFM.

The neat thing about this is that the data is properly guessed into artist and title, and the Metadata Searcher Plugin takes it from there to figure out what the album name is and retrieve it’s cover art. This also allows the Recommendations Plugin retrieve proper data from Last.fm for the panel across the bottom.

NBC Wins Monday Nights

Okay, that might be premature since I haven’t even bothered checking out the other networks. But tonight was the series premiere of Chuck and the season 2 premiere of Heroes. Heroes was fantastic, but I think I enjoyed Chuck even more. And it’s not just because of lovely  Julia Ling, who didn’t get much screen time in the pilot, unfortunately.

The Wikipedia link above summarizes the show better than I can, but the gist of it is that Chuck, in a sort of The Computer Wore Tennis Shoes moment (but without the lightning) absorbs a stream of photos and videos containing government secrets. World saving ensues! It’s a fun cast, including Adam Baldwin. This show is definitely on my must watch list.