Seam carving

Is it possible to make Seam Carving effect in Spark AR?
I tried to get 1 image from camera in JavaScript but its impossible :frowning:

It’s totally possible to get the camera texture in script, but what do you want to do with it? If you’re looking for some way to iterate over pixels, you might be disappointed. The texture can only be used with reactive shader signals (you can’t write a for-loop and get pixel values).

Anyway, as far as the effect goes, I’m pretty sure it’s powered by some content-aware scaling machine learning model, which definitely can’t run in Spark. You could fake it with some distortion maps that get deformed a bit more on every frame (either procedurally, or with an animation sequence). This additive procedural deformation is the type of thing that I’ve done in Flow Kit.

Thank You very much! I will try it.

I studied seam carving algorithm yesterday lol. Yep, it requires pixel read/write, sadly not possible in Spark.