View Full Version : Find out which pixels or part are processed by an AVIsynth filter
foxyshadis
1st November 2014, 11:54
Are you trying to create a rotoscope-style animation? CelForeground and MSU Cartoonizer are very good at creating something close. For more complicated object masking/fills, CelForeground is pretty much the only AviSynth filter that's ever attempted to tackle this problem, and it has some functions that might help. (I miss mg262.) vcmohan created a ColorIt plugin with flood-fill capability, as ColorDrops(). It's a purely manual function, it requires a start point so you'd have to solve the problem of tracking the people and animating the start point, too.
Real NLE/FX editors are much better suited for this, like Blender or Lightworks, though Premier/AE, FCP, and Vegas make this kind of work take seconds instead of hours.
Shirtfull
1st November 2014, 12:23
@ Sirt
Requirements
1 Virtualdub Here:- http://www.virtualdub.org/
2 Image Layering Filter -- by Brian Allen Vanderburg II found here:-http://www.infognition.com/VirtualDubFilters/overlay.html or http://neuron2.net/hosted.html
3 Vdscript here:-https://www.dropbox.com/s/ccifn7crb9ei2ic/Testcube-to-blue-backgound.vdscript?dl=0
Install Image Layering filter in virtualdub plugin folder.
Now open Virtualdub, then under tools/create test video, select RGB colour cube.
Then load processing settings (under file) or press CTRL+L to load the vdscript. (where U downloaded it too.)
Then press play(0) (second right arrow) or scrub along the playline, you should see two panels with spinning cubes, one unprocessed, with a grey background and the other, processed and a blue background.
Description of process (in brief)
Open filter-chain list under video/filters or press CTRL+F
1 Filter named difference = Layer filter, extracts foreground region from grey background using a grey difference mask/colour and increases contrast for next filter
2 Ignore the fill filter
3 Filter named mask = threshold filter, This creates a black and white mask (two colours) of the cube only.
4 Filter named background = 2nd instance of layer filter, here we introduce a new background, blue.
5 Filter named Output = merge layers, this is where we combine the new background, source and mask for output.
Double click on each filter to see how it is configured.
Try changing the background colour from blue to a colour of your choice by configuring the second layer filter and don't forget to apply changes before closing filter.
sirt
1st November 2014, 12:52
Thanks foxyshadis for your answer. To answer your question, I don't plan to create a rotoscope-style movie. I'm just playing around with masks and trying to detect some shapes. As I want to work under AVsP and I want to use avisynth I will have to use the filters you refer to. You were talking about that that (http://www.avisynth.nl/users/vcmohan/ColorIt/ColorIt.html) which correspond to a large amount of filters. I'm going to have a look but, in so far as you may know how I could apply it, could you tell me how I'm supposed to use it : knowing the borders, would it be possible to "reconstruct" what's inside with that filter ? An example (script) is welcomed. I will save time if you already have an idea on how to use such a filter.
Shirtfull thanks for your detailed method. But before I give it a try, is there a way to do that via AVIsynth (under AVsP editor for example) ? Indeed I want to detect pixels inside the borders for some frame for examples and not the whole video.
sirt
2nd November 2014, 10:38
Moreover, do you think anything from MVtools (http://avisynth.org.ru/mvtools/mvtools2.html) would be usefull for my problem ?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.