Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As you said its a callback function that is called every time a new frame is rendered.

The callback function CameraPlugin::OnNewFrame can get up to 5 Parameters. The values come directly from the Event (as far as i know). A typical callback will look like this:

void CameraEffectPlugin::OnNewFrame(const unsigned char *_image,
                          unsigned int /*_width*/,
                          unsigned int /*_height*/,
                          unsigned int /*_depth*/,
                          const std::string &/*_format*/)
{
// some code here
}