NAP
Public Member Functions | Public Attributes | List of all members
CVClassifyComponentInstance Class Reference

#include <cvclassifycomponent.h>

Public Member Functions

 CVClassifyComponentInstance (EntityInstance &entity, Component &resource)
 
virtual ~CVClassifyComponentInstance () override
 
virtual bool init (utility::ErrorState &errorState) override
 
std::vector< math::RectgetObjects () const
 
- Public Member Functions inherited from ComponentInstance
 ComponentInstance (EntityInstance &entity, Component &resource)
 
virtual void update (double deltaTime)
 
nap::EntityInstancegetEntityInstance () const
 
nap::ComponentgetComponent () const
 
template<typename T >
T * getComponent () const
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

nap::ComponentInstancePtr< CVCaptureComponentmCaptureComponent = { this, &CVClassifyComponent::mCaptureComponent }
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Detects objects in a frame using a HaarCascade profile. Classification is performed on a background thread when the 'CaptureComponent' receives a new frame. Call 'getObjects' to get a list of classified (detected) objects.

Inheritance diagram for CVClassifyComponentInstance:
[legend]
Collaboration diagram for CVClassifyComponentInstance:
[legend]

Constructor & Destructor Documentation

◆ CVClassifyComponentInstance()

CVClassifyComponentInstance ( EntityInstance entity,
Component resource 
)

◆ ~CVClassifyComponentInstance()

virtual ~CVClassifyComponentInstance ( )
overridevirtual

Member Function Documentation

◆ getObjects()

std::vector<math::Rect> getObjects ( ) const

Returns a list of classified (detected) objects. This call is thread safe and can be called every frame.

Returns
list of classified (detected) objects.

◆ init()

virtual bool init ( utility::ErrorState errorState)
overridevirtual

Initializes the classification component.

Parameters
errorStatecontains the error when initialization fails.
Returns
if initialization succeeded.

Reimplemented from ComponentInstance.

Member Data Documentation

◆ mCaptureComponent

nap::ComponentInstancePtr<CVCaptureComponent> mCaptureComponent = { this, &CVClassifyComponent::mCaptureComponent }