#include <cvcapturecomponent.h>
Public Member Functions | |
CVCaptureComponentInstance (EntityInstance &entity, Component &resource) | |
virtual | ~CVCaptureComponentInstance () |
virtual bool | init (utility::ErrorState &errorState) override |
Signal< const CVFrameEvent & > * | getFrameReceived () |
const CVCaptureDevice & | getDevice () const |
CVCaptureDevice & | getDevice () |
![]() | |
ComponentInstance (EntityInstance &entity, Component &resource) | |
virtual void | update (double deltaTime) |
nap::EntityInstance * | getEntityInstance () const |
nap::Component * | getComponent () const |
template<typename T > | |
T * | getComponent () const |
![]() | |
Object () | |
virtual | ~Object () |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
Signal< const CVFrameEvent & > | frameReceived |
Triggered when the component receives a new opencv frame. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Receives frame updates from a nap::CVCaptureDevice on the main application thread. The actual capture operation is handled by the nap::CVCaptureDevice on a background thread. Register to the 'frameReceived' signal to receive frame updates on the main processing thread.
Note that the frame that is forwarded to potential listeners is a reference. Do not modify the content of the frame! Changes will be forwarded to other listeners. To get an actual copy of the content of the frame call FrameEvent::clone(). Do this before performing any operation on the frame itself.
CVCaptureComponentInstance | ( | EntityInstance & | entity, |
Component & | resource | ||
) |
entity | the entity this component belongs to. |
resource | the resource this instance was created from. |
|
virtual |
CVCaptureDevice& getDevice | ( | ) |
const CVCaptureDevice& getDevice | ( | ) | const |
Signal<const CVFrameEvent&>* getFrameReceived | ( | ) |
Returns the signal that is called when a new frame is received.
|
overridevirtual |
Initializes the capture component instance.
Reimplemented from ComponentInstance.
Signal<const CVFrameEvent&> frameReceived |
Triggered when the component receives a new opencv frame.