|
|
|
|
|
by repsilat
2138 days ago
|
|
Does repeated single-pixel seam-carving minimise energy for the "remove n seams" problem? If not, is the global algorithm in P? Also, I guess this is beside the point, but surely almost all of the DP structure can be reused if you're repeatedly removing seams... |
|
It's not besides the point at all. If you can reduce this linear-time algorithm to, say, amortized constant, then you'll handily beat parallelism.
After you remove a seam, you need to recompute the cones below every removed pixel -- which ends up being the cone below the topmost removed pixel (sadly, you can't just zip down the neighbors of the seam, but you can avoid expensive data moves with a 2d linked list). If the image is super wide, that gives you a speedup by approximately the aspect ratio. If it's square, you should be able to cut the runtime in half. If it's tall and skinny, neither this nor the author's approach are terribly helpful.