Log in

View Full Version : Rotoscope-type averaging?


Bexley
13th February 2012, 05:41
I have an interesting problem - I'm trying to isolate a moving background from the scrolling text over it. I have 4 examples of the it, each with exactly the same background but different scrolling text moving over it. It seems to me that there ought to be a way to take these 4 clips and compare them, then remove whatever is different between all of them - which should only be the scrolling text - and leave me with a nice clean background that I can use somewhere else.

I've played around with average and subtract a little, but I just can't get a handle on it. Is what I'm trying to do even possible with AVISynth? And if so, anybody have any ideas on how to proceed?

StainlessS
13th February 2012, 07:07
I doubt whether you will get any answers on this post without at least a couple of sample clips.

IanB
13th February 2012, 07:36
You want to research the concept of transparency.

Use some sort of chroma key technology or levels clamping to build a mask applicable to the scrolling text.

Use the text masks to define the area where text is as transparent. Use Overlay or Layer to do the compositing of the 4 versions to achieve a final background that is hopefully free of text.

Of course if a given area has text pixels in all 4 versions you will need something to fill the remaining hole. The technology for removal of logo's will probably be very helpful here.

Bexley
14th February 2012, 03:34
Ah, yes, samples. Should have anticipated that. :)

Here you go. A clean background is what I'm after.

http://www.mediafire.com/download.php?5rsr7y7h90c9ohb

StainlessS
14th February 2012, 08:02
Bexley,

Have had a look at clips, your gonna have fun there.
Clip sequence's are cyclical about every 100 frames, but they throw a spanner in the works every
now and then.

Need to get clips aligned to similar frame and without any video fading in.
Sample1, trim(80,0), lets call it V1
Sample2, trim(81,0) lets call it V2
Sample3, trim(117,0) lets call it V3
Sample4, trim(33,0) lets call it V4

V1 Cyclical Sequences starting at frames, 0,101,201-Incomplete. (frames len, 101,100)

V2 Cyclical Sequences starting at frames, 0,100,200,302,403-Incomplete. (frames len, 100,100,102,101)

Doing subtract(V3,V4), we find these two are aligned with each other ok.
Cyclical Sequences starting at frames, 0, 100, 202, 303, 403, 503, 605-Incomplete. (frames len, 100,102,101,100,100,102)

Might be best to pick out only the 100 frame sequences and treat them all as parallel clips, that would give you
six 100 frame clips to work with (counting the 3 identical V1/V2 only once each).

Seems a lot of work for 4 seconds of credits free video, of course, you can loop it forever if you desire
and will not really be able to tell the difference anyway.

PS, Just wondering if it is one of the episodes recovered from Canadian archive, perhaps reason for the
wondering length of sequences (Canada NTSC ???).

EDIT: Oops, V3 and V4 are same sequences except for credits, so you have 9 x 100 frame seq's not 6.

poisondeathray
14th February 2012, 18:21
Were you more interested in the avisynth approach , or the end result ?

I had a quick look in AE, and roto'ed out a loop from clips 3&4 in about 15 minutes . I can offer to upload it somewhere if you want

If you don't have access to roto software, free software like debugmode wax , maybe even blender should even be able to do it


Regarding isolating by color key or luma key: there is difference between text and background, but it's not sufficient to get a clean separation without other garbage masks. You'll get overlap and holes. A quick block mask will get cleaner results, faster.