Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Probably not quite, because the order in which you carve seams matters for every variant that I'm aware of (forward of backward energy seam carving). That is, if you reduce a 200x200 image to 100x100, you get a different result if you do that in order 200x200 -> 100x200 -> 100x100 than if you do that in order 200x200 -> 200x100 -> 100x100.

But if you constrain it so that any reduced resolution is carved by stepping through the path that represents a straight line from the original image, and pre-generate all images, you might end up with something that looks smooth.



What if you do it (I realize I should probably just try coding this myself), step-by-step, alternating? Like 200x200 -> 199x200 -> 199x199 -> etc

(I forget the specifics of how seam carving works again, so maybe this approach makes no sense)


That's more or less what I was trying to convey: for any size reduction, take the route that follows the path with the shortest Euclidian distance[1] (as opposed to Manhattan distance[1]) from the original resolution.

If you do that, then the transitions should look quite smooth. You better memoize the intermediate results if you want decent performance though ;)

So yes, I think your line of thought is on the right track!

[0] https://en.wikipedia.org/wiki/Euclidean_distance

[1] https://en.wikipedia.org/wiki/Taxicab_geometry




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: