That's really neat. What are some practical applications for Seam Carving? Maybe in video games with dynamic resizing of landscapes?
I have a photo of my friend, his ex-wife and a few others standing together on a camping trip. I wanted to share that photo with the group since it was the tenth anniversary of that trip, but didn't want to remind my friend of his divorce, so I used seam carving to elide his ex-wife. (The tool I used allows you to paint areas of low or high energy.) The result was almost seamless (pun intended) and you wouldn't notic…
Parallel Seam Carving
31–39 of 39 posts
Re: Parallel Seam Carving
#32Re: Parallel Seam Carving
#33Earlier quoted context omitted.
That... that was mind-blowing. This discovery is 13 years old. Although it has clear limitations when it comes to humans, I'm surprised I don't see this kind of resize feature available in more software. Does Photoshop have this hidden in a drawer somewhere? Does imagemagick support this?
You will probably see it appear everywhere in 10 years when the patent expires. https://patents.google.com/patent/US8213745B2/en
Re: Parallel Seam Carving
#34If you were going to divide the image into K horizontal strips of triangles, instead divide the top half into K/2 horizontal strips of triangles and divide the bottom half into K/2 horizontal strips of triangles. To make things easier at the end, please include a 1px tall overlap between the top and bottom parts. Work downward from the top and upward from the bottom until you reach the middle. At the middle, for each column, you have the cost of the top half of the minimum seam that includes that pixel and the cost of the bottom half of the minimum seam that includes that pixel. So you can add those together then take the min as before.
Re: Parallel Seam Carving
#35Re: Parallel Seam Carving
#36How does seam carving preserve important symmetries (e.g. in the human face)?
Re: Parallel Seam Carving
#37How does seam carving preserve important symmetries (e.g. in the human face)?
Re: Parallel Seam Carving
#38Simply resampling an image smaller keeps the large-scale structure (the shape and color), but loses the fine-scale structure (texture.) That’s why we don’t just resample photos down to 32x32 and use them as icons :)
Seam Carving (whether parallel or not) does the opposite: it preserves the fine-scale structure (texture) but distorts the large-scale structure (shape.)
But not always! The amount of shape distortion in Seam Carving is worst case O(N) with the number of seams deleted, but best-case o(1). It depends on the algorithm’s choices of seam.
Regular iterative Seam Carving, as described by its original paper, isn’t stateful-enough to be able to minimize any whole-image quality (like loss of large structure.) So it’s no surprise it hasn’t been used for something like this.
But parallel Seam Carving might just be the ticket for this problem. A model could be trained to select an optimal set of seams that work together to minimize the large-structure deformation of the image (i.e. the image’s lower-band difference in frequency-space), while also individually being low-entropy seams from the Seam Carving algorithm’s perspective.
Anyone want to take a crack at this?
Re: Parallel Seam Carving
#39That's really neat. What are some practical applications for Seam Carving? Maybe in video games with dynamic resizing of landscapes?
I have a photo of my friend, his ex-wife and a few others standing together on a camping trip. I wanted to share that photo with the group since it was the tenth anniversary of that trip, but didn't want to remind my friend of his divorce, so I used seam carving to elide his ex-wife. (The tool I used allows you to paint areas of low or high energy.) The result was almost seamless (pun intended) and you wouldn't notic…