Effects - Using Effects

To use the effects framework requires three basic steps.

First you need to create an effects object. This is a singleton class, so you'll need to use a pointer and the effects::instance method.

Next you need to load the plugins you may want to use, to do this specify the path to the plugins in the effects::registerEffect method.

Once sucessfully registered you may use an effect by passing the active frame to the effects::applyEffect method.

Assuming that you have a valid vdFrame called 'frame' and you know that the "effects/mirror.so" plugin provides an effect called "Mirror" you can just do as follows.

    1 vc::effects * vcfx = vc::effects::instance();
    2 vcfx->registerEffect("effects/mirror.so");
    3 vcfx->applyEffect("Mirror",frame);

That's a lot of assuming however, so there are a number of useful functions to help you figure out what effects exist and what they do. For that please look into effects::getEffectNames , effects::getEffectArguments and others.

Todo:
Explain arguments.

Navigation: Back (Effects) - Home - Next (Effects - Creating Plugins)
Generated on Mon Jul 28 16:14:11 2008 for libvcvideo by  doxygen 1.5.3