Seam Carving

Example adapted from work by .

The seam carving algorithm

This marimo demonstration is partially an homage to of 3Blue1Brown, which demonstrates the seam carving algorithm in :

As Grant explains, the seam carving algorithm preserves the shapes of the main content in the image, while killing the "dead space": the image is resized, but the clocks and other content are not resized or deformed.

This notebook is a Python version of the seam carving algorithm, but it is also a demonstration of marimo's , which is helpful because the algorithm is compute intensive even when you use .

Try it out by playing with the slider!

Try it!

[Image blocked: No description][Image blocked: No description]