Parallel Seam Carving
shwestrick.github.io
Parallel Seam Carving
1–10 of 39 posts
Re: Parallel Seam Carving
#2Re: Parallel Seam Carving
#3That's really neat. What are some practical applications for Seam Carving? Maybe in video games with dynamic resizing of landscapes?
https://www.youtube.com/watch?v=6NcIJXTlugc
This is still amazing all of these years later.
Re: Parallel Seam Carving
#4 IIIIJJJJKKKKLLLL
EEEEFFFFGGGGHHHH
AAAABBBBCCCCDDDD
... where each row is dependent on the entire previous row, break it up like this: HHHHIIIIJJJJKKKK
EEEEEEFFFFGGGGGG
AAAABBBBCCCCDDDD
Where E is dependent on A and B, (and begins when they are done) H is dependent only on E, F is dependent on B and C, etc. This way you don't have to wait for the entire strip to finish, you can start work on E after A+B, but while D is still working. This also gives you weird block sizes for "free", which is a huge no-no with barrier synchronization. For instance, Es and Gs are size 6; if the first example had most elements of size 4, but one element of size 6, it would be catastrophic. All your threads would be done when the final thread is only 66% complete, and it's single threaded from there on out for that strip.Re: Parallel Seam Carving
#5That's really neat. What are some practical applications for Seam Carving? Maybe in video games with dynamic resizing of landscapes?
Each pixel can be tagged with a rank according to its seam number along each axis. If you have 4,000x4,000 pixels then each pixel needs a 12-bit integer value for each axis; and if you want the optimal map it’s another 1 bit per pixel. So something on the order of an extra 25-bits per pixel for a naive encoding, which almost doubles the size of an 8-bit per channel image.
It also has no explicit scene awareness. The energy function essentially defines an implicit heuristic of scene importance, which is surprisingly reasonable until you’re removing >25% of pixels along either axis.
I believe it shipped with Photoshop for a couple years (maybe still?) but in my experience it’s a bit more of an artistic effect than an automatic and scalable solution—and it would be really hard to make it run in real time at game frame rates. (I think the artifacts alone would make it not worth it for games.)
Re: Parallel Seam Carving
#6That's really neat. What are some practical applications for Seam Carving? Maybe in video games with dynamic resizing of landscapes?
Re: Parallel Seam Carving
#7That's really neat. What are some practical applications for Seam Carving? Maybe in video games with dynamic resizing of landscapes?
Perhaps using seam carving was a little bit overboard but I thought it would be interesting and it works really well for most Earth landscape photos. I only rarely see artifacts and minor distortions in the resized images it produces. Also since I only needed to resize one photo per day, the computational overhead was not a very big deal.
Re: Parallel Seam Carving
#8That's really neat. What are some practical applications for Seam Carving? Maybe in video games with dynamic resizing of landscapes?
My current favorite: https://www.youtube.com/watch?v=NRB_ASog9QU
Re: Parallel Seam Carving
#9That's really neat. What are some practical applications for Seam Carving? Maybe in video games with dynamic resizing of landscapes?
A non-practical application is for funny memes. Someone figured out Photoshop's Content Aware Scaling feature can hilariously distort faces [1], and people have been using it memes since. My current favorite: https://www.youtube.com/watch?v=NRB_ASog9QU [1] https://knowyourmeme.com/memes/content-aware-scaling
Re: Parallel Seam Carving
#10Earlier quoted context omitted.
A non-practical application is for funny memes. Someone figured out Photoshop's Content Aware Scaling feature can hilariously distort faces [1], and people have been using it memes since. My current favorite: https://www.youtube.com/watch?v=NRB_ASog9QU [1] https://knowyourmeme.com/memes/content-aware-scaling
that video is just a bunch of screaming... is that really the best example for this?
If you want one on a real video, I guess there's this: https://www.youtube.com/watch?v=a8k3b-QNbhs