Improved seam carving with forward energy
avikdas.com
avikdas.com
Note that the authors tried other types of energy functions in their original papers, ones that didn't simply use color differences. No one energy function seemed to be perfect across a variety of images.
In this case applying gamma correction to compute the color difference in linear light would make things worse, as it'd model physical properties of the light, rather than human perception.
[1] https://avikdas.com/2019/05/14/real-world-dynamic-programmin...
[2] https://web.archive.org/web/20110707030836/http://vmcl.xjtu....
Literally everything about it. The concept, visualizing intermediate steps by producing a picture that shows the energy of each pixel, then the CS with finding the path, then seeing the image it produces. Just an incredibly interesting (and very modern issue given different screen sizes), a clever algorithm, challenging to implement, visually interesting results... It literally has it all.
here's a link to the paper, which has some cool results to look at: https://people.eecs.berkeley.edu/~efros/research/quilting/qu...
What you're talking about--expanding the number of pixels the seam can move from row to row--is certainly possible. This will require more computational resources, as each seam can continue from five different seams (or more if you choose to widen your slope parameter). And, I'm not sure you'd get enough visual coherence from these types of seams.
That said, the best way for to know for certain to is to try it out!
Is the algorithm run from scratch each time a seam is removed? I.e. energy function computed again on the resized image, all seams recomputed, then only the lowest energy seam is removed.. and repeat.
Or are all the seams from the first calculation used for resizing?
For illustrative purposes, I didn't optimize storing the cost data across frames, but that's something I could do.
However, you'll notice that the costs are only changed in a small area around the removed seam, so if I optimized the process, I could avoid recomputing costs for the majority of pixels.