ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

temporal median for background subtraction?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
philipp hahn
temporal median for background subtraction?
on Jun 25, 2018 at 3:44:46 pm
Last Edited By philipp hahn on Jun 25, 2018 at 3:46:52 pm

hi,
i'm a little surprised i found almost nothing about this, maybe it's the wording? anyway:
i want to key using background subtraction (in ae it's called "difference matte"), but as my matte i do not want to use a still image or a video from another source but the very same video, only with a temporal median applied - so each pixel is calculated from the median color value at its location of eg. 50 frames back and forth. the result of this should be, that i only key stuff, that moves at a certain pace whereas very slow changes in the shot (eg. moving light from the moving sun) will still be keyed out.
this technique is also often used to remove people in crowded shots, eg.: https://www.shutterstock.com/blog/photoshop-remove-people

how would i do this in after effects? or is there any other software i should be looking at?
thanks for any help in advance!
p


Return to posts index

Steve Bentley
Re: temporal median for background subtraction?
on Jun 25, 2018 at 6:11:26 pm

I haven't seen the code but given how we have used Mocha in the past I would imagine this is being employed at some point in the pipeline. To be fair, we have pro, so I'm not sure how robust the one that comes with AE is.



Return to posts index

Roei Tzoref
Re: temporal median for background subtraction?
on Jun 26, 2018 at 12:07:36 am

here's a tutorial using difference matte from the same video. if you have a shot for us to see and test and can share, please do

Roei Tzoref
2D/VFX Generalist & Instructor
♫ AeBlues Tutorials ♫
http://www.tzoref.com


Return to posts index


philipp hahn
Re: temporal median for background subtraction?
on Jun 26, 2018 at 4:55:20 pm

thanks for your help but, um, which of these tutorials should i be looking at? there are four 10+ minute tutorials behind this link and at least on first sight, none seems to say anything about temporal median... or did i miss something?
best
p


Return to posts index

Roei Tzoref
Re: temporal median for background subtraction?
on Jun 26, 2018 at 8:13:11 pm

Forgot the link:
http://motionworks.net/after-effects-difference-matte/

Roei Tzoref
2D/VFX Generalist & Instructor
♫ AeBlues Tutorials ♫
http://www.tzoref.com


Return to posts index

philipp hahn
Re: temporal median for background subtraction?
on Jul 8, 2018 at 6:09:25 pm

hello again,
sorry for the delay, for future reference:
roei's tutorial video uses photoshop to create a median clean plate, which does work nicely for individual clips/shots but unfortunately i'm dealing with a lot of frames and photoshop crashes on these quantities.
the solution i'm currently exploring and which seems most promising is not using after effects or photoshop at all but to do it from the command line using G'MIC, details are explained here: https://discuss.pixls.us/t/a-guide-about-computing-the-temporal-average-med...

again, thanks for all the help and have a wonderful day!
p


Return to posts index


philipp hahn
Re: temporal median for background subtraction?
on Jul 8, 2018 at 6:57:17 pm

sorry, forgot something, also interesting: https://github.com/zo7/median-video


Return to posts index

philipp hahn
Re: temporal median for background subtraction?
on Jul 25, 2018 at 10:12:18 pm

for reference: still not completely done with this but close - i now do it through command line scripts with a combination of imagemagick, gnu parallel and ffmpeg... i went for imagemagick simply because it appeared the most flexible.


Return to posts index

Roei Tzoref
Re: temporal median for background subtraction?
on Jul 26, 2018 at 1:12:47 am

well don't forget to show us the result when you are done ☺

Roei Tzoref
2D/VFX Generalist & Instructor
♫ AeBlues Tutorials ♫
http://www.tzoref.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]