Compare Frames

Hello to all
How can we compare the frames in spark ar program?
I mean, if an object moves in the texture, how do we know which direction the object has moved compared to the previous frame?
Just like optical flow technology

I wanted to create an effect that whenever something moves, an arrow will show which direction the object has moved
Like the picture below

Here’s a pretty compact shadertoy example of this.

But… looking at the demo, it seems like there may be some errors in there. Maybe just use it as inspiration for the arrow drawing.

This code from ofxFlowTools is much easier to understand, but there’s no live demo.

1 Like