Deleting Moving parts of video

Hi,

I would like to remove moving parts of a video.
For example a video of a steady camera filming a highway, where I’m left with only the highway.


I’ve been experimenting using cache-top and select cache and compositing those to see the difference and then masking, though the results are not that good as you can see.
I think I’m probably not the first one to try this.
Any advice?
Thanks!

I’m probably missing something but, if you want a video with no moving parts, wouldn’t you just want a still image?

If you want to just have a still portion of the image in a locked off shot, I think you’d want to make a matte and composite a clean plate. In the example of your image, if you wanted to have moving clouds and a clear road, I would recommend shooting or editing together a clean shot of the road and then make a matte that isolates the road from the rest of the frame. Then composite the clean road.

yes thanks for your input.
With photoshop it’s easily done ofcourse, but I was hoping there would be some generative way with TD, so I can quickly work with lots of different videos.
Though now that you say it like this, it’s not that much work to make 1 still / video.

Cheers!

if you want to build a matte in TD without going into photoshop, the kantan mapper (in the palette library under ‘mapping’) has a live vector mask drawing interface that I use often for this.

perfect!! That’s probably the fastest for not loading/saving/editing files!
Thanks a million

1 Like

Still,
Using photoshop there’s a way you can stack images, and than have it look at the median.
so simplified, if pixel 1 is the same in 20 photos but different in a few others, it will choose the pixel that is the same in the 20 photos.
I’m not sure if there’s a way to have a median blend mode.
Cheers

Hi,

‘Median’ is a synonym for ‘Average’ which is a blend mode that is available in the composite TOP

To clarify the behavior: median/average doesn’t select the most common pixel value, rather it adds all the values together and divides by the number of samples, which is similar but not really the same.

edit: I just looked at this mode more closely and it looks like the TD Average doesn’t divide by the total number of inputs, but rather steps through the inputs in pairs and averages them sequentially, leading to different results based on input order. I’m going to do some experiments with the GLSL multi top and will post something in a bit.

You can do an average of n-input values using the glslmultiTOP and a for loop that references the TD_NUM_2D_INPUTS uniform.

a more flexible but also more sophisticated setup would be to use a tex3dTOP set to 2d texture array:

the challenge is that you need a constant value for the number of for loop cycles in GLSL at compile time. fortunately TD lets us assemble the shader code using a network of DATs that poll all of our constants for us.

I’ll attach this project and you can use it for testing. in theory you can just change the input into the tex3dTOP and then change the cache size to suit your needs.

here’s a screenshot featuring a transient nerd in his office for reference:

It might be what you’re looking for. In this case I’ve got a cache size of 300 at 1080 at 60hz which uses up about 2.5gigs of VRAM. It seems quite reasonable to me to do something like this at 30fps instead.

dyn_2daverage.toe (4.3 KB)

edit: here’s a way easier approach using the feedbacktop to do the GLSL for loop:

dyn_2daverage_fb_noGLSL.toe (4.0 KB)