Module for ofxModule that chromakeys an image using a manipulated version of ofxChromakeyShader.
Compatible with openFrameworks 0.11.0+
Generate all project files using the openFrameworks Project Generator.
Have a look at the sample project to get started directly and have a small explanation here.
The module can be configured in the settings.json, which is hard since you do not have a direct feedback.
Therefore it is better to use the greenscreenSetup
example to configure the parameters.
The module receives ofTexture
messages, proceeds them and notifies them back.
To change the background you have to send an ofTexture
message to the address ´setBg´.
shared_ptr<ofTexture> texture;
notifyEvent("setBg", texture);
The proceeded picture arrives as ofTexture
message.
void Presenter::proceedModuleEvent(ModuleEvent& e) {
// update the cam image
if (e.type == ModuleEvent::MODULE_EVENT_TEXTURE) {
proceedTexture = e.texture;
}
}