• On MovieTome: See the villain of IRON MAN 2!
November 19, 2007 4:00 AM PST

'Seam carving' photo resizing now for video

by Stephen Shankland
  • Font size
  • Print
  • 1 comment

MONTEREY, Calif.--In August, researchers unveiled a new way of shrinking or expanding photos called seam carving. Now it turns out the technique applies to video, too.

Ariel Shamir, a senior lecturer at the Efi Arazi School of Computer Science in Israel and a visiting scientist with Mitsubishi Electric Research Laboratories, showed off the technique at the 6sight digital-imaging conference here last week. (Adobe Systems has hired another seam carving researcher, Shai Avidan.) The technology analyzes a picture for vertical or horizontal "seams"--the term the researchers use to describe a path traversing the photo where pixels are most like their neighbors and therefore least likely to be missed.

The effect is that important areas such as human faces remain intact, while relatively uniform backgrounds such as lawns or skies are squeezed. Seams zig-zag to an extent, for example detouring around clouds through interconnected patches of blue sky. Seam carving works best for photos with multiple subjects separated by an uninteresting background; a subject that occupies the entire frame is likely to be distorted as the image is scaled down.

A related technique called seam insertion reverses the process to add data, giving photos a more spacious look.

During Shamir's demonstration, he widened and narrowed a variety of photos. In addition, he showed how to select specific pixels for priority preservation or removal, in one case excising a girlfriend from a photo the way Soviet censors vanished Leon Trotsky.

And showing off a new twist on the technology, Shamir did the seam carving on a running video of a golfer taking a swing. The golfer remained intact even as the fairway changed from a narrow sliver to a broad tract of green grass. To see the demonstration, check the video above.

The content-aware resizing tool stretched the two narrower images by Japanese artist Utagawa Hiroshige into the adjacent wider versions.

(Credit: Shai Avidan, Ariel Shamir)

One area where seam carving could be useful is in resizing images along with the Web pages they're shown on, for example preserving important parts of a photo even when it's displayed on the tiny screen of some Internet-connected gadget. That could apply to video as well as to still images, though obviously it would require more computational horsepower.

Coming from a journalism background, my instinct is to keep photos generally true to the original, so these automated distortions at first ruffled my feathers.

But on further reflection, it occurred to me that at least when it's working well, seam carving does to an image precisely what my brain does as well: focus on the important bits.

What was that portrait I saw in my art class of youth, an elderly woman seated in black clothing? Her hands and face were painted with detail and care, but the rest of the picture was painted with rough, almost slapdash strokes. But the painting was fine: my mind naturally cared chiefly about the face and hands, the instruments of human expression, and all else was largely optional. It was like a good lossy compression algorithm that saves space by throwing away the data we're not going to miss.

Children, too, instinctively do the same thing. When they draw pictures of people, the features on the face often creep around to occupy the entire head. In reality, you can cover most of your facial features with the palm of one hand, so the significant parts don't actually take up much of the actual surface area. But in children's pictures, anything above the eyes or eyebrows evidently doesn't deserve much attention.

So perhaps seam carving is just an overt manifestation of what we already do ourselves.

Just don't use it to mess with any news sites!

Originally posted at Underexposed
Stephen Shankland writes about a wide range of technology and products, but has a particular focus on browsers and digital photography. He joined CNET News in 1998 and since then also has covered Google, Yahoo, servers, supercomputing, Linux and open-source software, and science. E-mail Stephen, or follow him on Twitter at http://www.twitter.com/stshank.
Recent posts from Crave
Barnes & Noble Nook to hit stores later than expected
Searching for Cyber Monday laptop deals
Get a Brother HL-2140 laser printer for $49.98 shipped
iPhone officially lands in South Korea
How can Dell Netbook be 'perfect for tweeting'?
Investor forecasts show Psystar is crazy
Gameloft's iPhone games on sale for 99 cents
AT&T has refurbished 16GB iPhone 3Gs for $49
Add a Comment (Log in or register)
MS SeamCarv 1.0b
by Ray Ozzie November 22, 2007 2:00 PM PST
This is how it should be done!
http://****************.blogspot.com
Reply to this comment

About Crave

The name says it all. Crave is our blog about gorgeous gadgets and other crushworthy stuff. If you would like to contact Crave with a tip or comment, please write to: crave@cnet.com

Add this feed to your online news reader

Crave topics

The browser battles go on and on

roundup From Firefox to IE and from Chrome to Opera and Safari, there's no sitting still for browser makers looking to keep their products fresh and competitive.

3G wireless still holds promise

The next generation of 4G wireless may get all the headlines, but advanced 3G technology will likely dominate services for the next few years.