Content-Aware Image Resizing 174
An anonymous reader writes "At the SIGGRAPH 2007 conference in San Diego, two Israeli professors, Shai Avidan and Ariel Shamir, have demonstrated a new method to shrink images. The method is called 'Seam Carving for Content-Aware Image Resizing' (PDF paper here) and it figures out which parts of an image are less significant. This makes it possible to change the aspect ratio of an image without making the content look skewed or stretched out. There is a video demonstration up on YouTube."
nice! (Score:5, Interesting)
Other than that though, that's pretty awesome... I'm sure there's more instances where it doesn't look right than what they showed, but it's definitely cool how well it works as it stands!
I can imagine it would be extremely useful for ex-boyfriends or ex-girlfriends; just load up all their photos of them and their ex, wave the magic eraser, and *boom* you don't have to delete all your old vacation shots
I wonder how well it would work for the porn industry too; nice automatic resizing of breasts without ruining the picture! Fetishists will be SO happy!
Slightly Strange (Score:3, Interesting)
DP Approach (Score:4, Interesting)
or entropy of the background is as great as the foreground. Also the paper doesn't go into
too much details about the dynamic programming approach they used to find the path of least
energy, I guess that aspect of it is patentable. Another thing they could investigate is the
use of diagonal seams instead of just staggered vertical and horizontal seams.
All in all a very interesting read.
Re:Slightly Strange (Score:2, Interesting)
According to the video, the added background information is actually the averaging of the extra "low energy" information around it. So it's not quite duplicated.
Re:nice! (Score:2, Interesting)
That said, as pointed out in the paper there's plenty of room for a higher level of analysis over the top of the basic seam-carving procedure. The function used to calculate the energy of a given pixel is easily swapped out with any one of dozens of different approaches. A more user-friendly implementation could attempt seam-carving based on a number of different feature maps and work out which is likely to produce the least distortion for a given image.
Anyhow, cracking bit of work IMHO, with boatloads of potential applications.
Alli
Gimp! (Score:5, Interesting)
Re:The Commissar Vanishes (Score:2, Interesting)
It could be worse.
In December 2001 The New York Fire Department unveiled plans for a statue based on the photograph [wikipedia.org] to be placed at the Brooklyn headquarters. In an effort to be politically correct, the statue was to include black, white, and Hispanic firefighters. However, it was cancelled in an outcry about rewriting history -- the depicted firefighters are white.
My Implementation (Score:5, Interesting)
Re:A picture speaks a thousand words... (Score:5, Interesting)
if you have 3 people in a picture and you crop it down to 2, you've erased a person, but you haven't changed who is seated next to whom. if you use this method and the middle person is erased, you make it appear as though the outer two people were in fact seated next to each other when they weren't.
we are used to the idea that a picture can be cropped (mentally considering what might be just outside the frame). We aren't yet used to the concept that the photo has effectively been cut and pasted together to create new relationships between the objects in the photo (though of course photoshop is getting us there).
to continue your analogy, if we take:
the quick brown fox jumped over the lazy dog
and drop letters, we can create:
the cow jumped over the dog
whereas "cropping" might let us say:
the quick brown fox jumped
I think it's clear that one of these is more misleading than the other, though in both cases you're just removing information. (in one case, some of that information happens to be spaces between letters/words)
some code (Score:4, Interesting)
http://rafb.net/p/jinioy45.html [rafb.net]
(yeah my coding sucks but it produces awesome results and I reversed engineered the algorithm from youtube so please grovel...)
I'll improve it soon to remove an arbitrary number of line, horizontally or vertically
- no recalculation of gradient, only the gradient near the line needs to be recomputed
- precomputes a file that store the order of the pixel needing to be removed
I need help with something though, I understand how the algorithm can precompute a file which says in which order pixel should be removed, but I don't see how this can work in *both* direction. Suppose you want to reduce vertically and horizontally at the same time, the horizontal change should completely break the precomputed vertical changes. How would you handle that?
Re:some code (Score:3, Interesting)
original
http://img96.imageshack.us/my.php?image=testxq4.j
somewhat reduced
http://img361.imageshack.us/my.php?image=outew8.p
very reduced
http://img484.imageshack.us/my.php?image=outas2.p