View Full Version : Script-fu Master needed| motion filter
Milkman Dan
3rd December 2002, 06:16
Hi guys. I need some help.
Is there a filter or script-fu configuration that will look at a frame, and turn a pixel 255 red, or 255 green if it was detected as moving?
Thanks.
Malcolm
4th December 2002, 13:26
Hi Dan,
i don't have the time to (think and) write the complete script. But i can give you some hints, so you can write it yourself (and learn something :))
Look here Script to increase compressibility (http://forum.doom9.org/showthread.php?s=&threadid=35923) to see how Layer() and Mask() works
In the following lines, i use names for clips like in the post above.
- Use mask_clip=Subtract(clip.Trim(1,0),clip) to get the Difference between two Frames.
- Use Greyscale() if needed
- Use Levels() to adjust things as you need them (strength of red/green, etc.)
- Use overlay=BlankClip(last, $FF0000).ConvertToRGB32() for a Red Mask ($00FF00 for Green) (see the link below how and where to use the 'overlay' clip)
- Use the 'overlay' and 'mask_clip' as input for Mask()
- Use some filters (e.g. Convolution3D) to remove noise before Subtract(). Otherwise you'll get Motion, where there's no
bye,
Malcolm
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.