Nooba Plugin API  0.12
API for the Nooba Video Surveillance System
 All Classes Namespaces Functions Enumerations Enumerator
NoobaPluginAPI Class Referenceabstract
Inheritance diagram for NoobaPluginAPI:
NoobaPluginAPIBase

Public Slots

virtual void onIntParamChanged (const QString &varName, int val)
 
virtual void onDoubleParamChanged (const QString &varName, double val)
 
virtual void onStringParamChanged (const QString &varName, const QString &val)
 
virtual void onMultiValParamChanged (const QString &varName, const QString &val)
 
virtual void onFilePathParamChanged (const QString &varName, const QString &path)
 
virtual void inputData (const PluginPassData &data)
 inputData data received from other plugin thru thid function. This is used to interconnect plugins. Another plugins outputData(PluginPassData* data) can be connected to this slot. More...
 
virtual void inputData (const QStringList &strList, QList< QImage > imageList)
 
virtual void onLineParamUpdated (const QString &varName, const QString frameViewerTitle, QLine line)
 

Signals

void createIntParamRequest (const QString &varName, int val, int max=100, int min=0)
 
void createDoubleParamRequest (const QString &varName, double val, double max=100.0, double min=0.0)
 
void createStringParamRequest (const QString &varName, QString val, bool isFilePath=false)
 
void createMultiValParamRequest (const QString &varName, const QStringList &varList)
 
void createLineParamRequest (const QString &varName, const QString &frameViewerTitle, QColor lineColor)
 
void debugMsgRequest (const QString &msg)
 
void outputDataRequest (const PluginPassData &data)
 
void outputDataRequest (const QStringList &strList, QList< QImage > imageList)
 
void createFrameViewerRequest (const QString &title, bool isVisible=true)
 
void updateFrameViewerRequest (const QString &title, const QImage &frame)
 
void updateFrameViewerVisibilityRequest (const QString &title, bool isVisible)
 
void createFilePathParamRequest (const QString &varName, QString path, nooba::PathType pathType, const QString &filter)
 
void generateAlertRequest (const QString &frameViewerTitle, const QString &msg, nooba::AlertType alert)
 

Public Member Functions

virtual bool init ()=0
 Initialise the resources used by the Plugin. More...
 
virtual bool release ()=0
 releases the resources used by the plugin. More...
 
virtual bool procFrame (const cv::Mat &in, cv::Mat &out, ProcParams &params)=0
 Base plugins' processing is done by calling this function. More...
 
virtual PluginInfo getPluginInfo () const =0
 metadata related to the plugin is taken from the function More...
 
void createIntParam (const QString &varName, int val, int max=100, int min=0)
 integer parameters can be created using this function More...
 
void createDoubleParam (const QString &varName, double val, double max=100.0, double min=0.0)
 double parameters can be created using this function More...
 
void createStringParam (const QString &varName, QString val, bool isFilePath=false)
 String parameters can be created using this function. More...
 
void createFilePathParam (const QString &varName, QString path=QString(), nooba::PathType pathType=nooba::FilePath, const QString &filter=QString())
 filePath parameters can be created using this function More...
 
void createMultiValParam (const QString &varName, const QStringList &varList)
 Multi value Parameters can be created using this function. More...
 
void createLineParam (const QString &varName, const QString &frameViewerTitle, QColor lineColor)
 Line parameters can be created using this function. More...
 
void debugMsg (const QString &msg)
 debugMsg More...
 
void outputData (const PluginPassData &data)
 outputData data to be shared with other plugins More...
 
void outputData (const QStringList &strList, QList< QImage > imageList)
 
void createFrameViewer (const QString &title, bool isVisible=true)
 createOutputWind creates MDI SubWindow to show the frame outputs More...
 
void updateFrameViewer (const QString &title, const QImage &frame)
 updateFrameViewer More...
 
void setFrameViewerVisibility (const QString &title, bool isVisible)
 setFrameViewerVisibility More...
 
void generateAlert (const QString &frameViewerTitle, const QString &msg, nooba::AlertType alert)
 generateAlert generate an alert. More...
 

Protected Member Functions

 NoobaPluginAPI ()
 

Additional Inherited Members

- Static Public Member Functions inherited from NoobaPluginAPIBase
static int APIMajorVersion ()
 
static int APIMinorVersion ()
 

Constructor & Destructor Documentation

NoobaPluginAPI::NoobaPluginAPI ( )
explicitprotected

private constructor so that this class could never be instantiated. Only be casted to this interface type to get the API version details.

Member Function Documentation

void NoobaPluginAPI::createDoubleParam ( const QString &  varName,
double  val,
double  max = 100.0,
double  min = 0.0 
)
inline

double parameters can be created using this function

This will create a parameter of type double. This is double type in C++. This parameter is of nooba::DoubleParam type. User can change the value of this parameter through the nooba VSS frontend. Changes to this function by the user interface is notified back to the plugin by onDoubleParamChanged() function. This function should be implemented in the plugin to listen for the changes done to nooba::DoubleParam type variables.

Note
This function should be called in init() function. if not this may lead to unexpected behaviour.
Parameters
varNamevariable name of the parameter. this is the variable name refered to in onDoubleParamChanged()
valdefault value
maxmaximum possible value for the parameter. If not given 100 is used
minminimum possible value for the parameter. If not given 0 is used
See Also
onDoubleParamChanged();
void NoobaPluginAPI::createFilePathParam ( const QString &  varName,
QString  path = QString(),
nooba::PathType  pathType = nooba::FilePath,
const QString &  filter = QString() 
)
inline

filePath parameters can be created using this function

User can change the value of this parameter through the nooba VSS frontend. Changes to this function by the user interface is notified back to the plugin by onFilePathParamChanged() function. This function should be implemented in the plugin to listen for the changes done to this parameter

Note
This function should be called in init() function. if not this may lead to unexpected behaviour.
Parameters
varNamevariable name of the parameter. this is the variable name refered to in onFilePathParamChanged()
pathdefault path
pathTypeType of selection is set according to nooba::PathType
filterfilter the selectable paths. following example shows including multiple filters eg: "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"
See Also
onFilePathParamChanged();
void NoobaPluginAPI::createFrameViewer ( const QString &  title,
bool  isVisible = true 
)
inline

createOutputWind creates MDI SubWindow to show the frame outputs

Parameters
titletitle of the subWindow
void NoobaPluginAPI::createIntParam ( const QString &  varName,
int  val,
int  max = 100,
int  min = 0 
)
inline

integer parameters can be created using this function

This will create a parameter of type integer. This is a int type in C++. This parameter is of nooba::IntParam type. User can change the value of this parameter through the nooba VSS frontend. Changes to this function by the user interface is notified back to the plugin by onIntParamChanged() function. This function should be implemented in the plugin to listen for the changes done to nooba::IntParam type variables.

Note
This function should be called in init() function. if not this may lead to unexpected behaviour.
Parameters
varNamevariable name of the parameter. this is the variable name refered to in onIntParamChanged()
valdefault value of the integer parameter
maxmaximum possible value for the parameter. If not given 100 is used
minminimum possible value for the parameter. If not given 0 is used
See Also
onIntParamChanged();
void NoobaPluginAPI::createLineParam ( const QString &  varName,
const QString &  frameViewerTitle,
QColor  lineColor 
)
inline

Line parameters can be created using this function.

Note
This function should be called in init() function. If not this may lead to unexpected behaviour.
Parameters
varNamevariable name of the parameter. this is the variable name refered to in onLineParamUpdated()
frameViewerTitletitle of the frameViewer that this line drawing tool should be shown on.
void NoobaPluginAPI::createMultiValParam ( const QString &  varName,
const QStringList &  varList 
)
inline

Multi value Parameters can be created using this function.

This type of variable can be used to create variable where there is a predefined set of values to choose from. When creating the parameter each value should be represented in QString format

Note
This function should be called in init() function. if not this may lead to unexpected behaviour.
Parameters
varNamevariable name of the parameter. this is the variable name refered to in onMultiValParamChanged()
varListlist of string containing the options for the user to select from.
See Also
onMultiValParamChanged();
void NoobaPluginAPI::createStringParam ( const QString &  varName,
QString  val,
bool  isFilePath = false 
)
inline

String parameters can be created using this function.

This will create a parameter of type QString. This is QString type in Qt C++. This parameter is of nooba::StringParam type if isFilePath argument is false and of nooba::FilePathParam otherwise If it is a file path it is preferred to use a createFilePathParam() function. This file path functionality is kept purely for compatibility purposes.

Note
This function should be called in init() function. if not this may lead to unexpected behaviour.

User can change the value of this parameter through the nooba VSS frontend. Changes to this function by the user interface is notified back to the plugin by onStringParamChanged() function. This function should be implemented in the plugin to listen for the changes done to nooba::StringParam type variables or nooba::FilePathParam type variables

Parameters
varNamevariable name of the parameter. this is the variable name refered to in onStringParamChanged()
valdefault value
isFilePathwhether to consider the parameter as a filepath or not.
See Also
onStringParamChanged(), createFilePathParam();
void NoobaPluginAPI::debugMsg ( const QString &  msg)
inline

debugMsg

debug output messages can be sent using this

Parameters
msg
void NoobaPluginAPI::generateAlert ( const QString &  frameViewerTitle,
const QString &  msg,
nooba::AlertType  alert 
)
inline

generateAlert generate an alert.

Parameters
alert
virtual PluginInfo NoobaPluginAPI::getPluginInfo ( ) const
pure virtual

metadata related to the plugin is taken from the function

Returns
PluginInfo structure is returned.
virtual bool NoobaPluginAPI::init ( )
pure virtual

Initialise the resources used by the Plugin.

Setting the plugin related resource aquisitions should be done within this function. Before plugin is used for processing work this function is called.

Resources that need to be refreshed when reloading need to be initialised within this function and released in release() function. Some plugins may need to load training data and need not refresh that at a later time. In that case training a model can be done in the constructor.

This function is a pure virtual function. When creating a plugin this function should be implemented in the plugin

See Also
release()
virtual void NoobaPluginAPI::inputData ( const PluginPassData data)
inlinevirtualslot

inputData data received from other plugin thru thid function. This is used to interconnect plugins. Another plugins outputData(PluginPassData* data) can be connected to this slot.

Parameters
data
virtual void NoobaPluginAPI::onIntParamChanged ( const QString &  varName,
int  val 
)
inlinevirtualslot

This functions will be called when the parameters are changed by the user.

void NoobaPluginAPI::outputData ( const PluginPassData data)
inline

outputData data to be shared with other plugins

Parameters
data
virtual bool NoobaPluginAPI::procFrame ( const cv::Mat &  in,
cv::Mat &  out,
ProcParams params 
)
pure virtual

Base plugins' processing is done by calling this function.

When the plugin is the base plugin this function is called by the Nooba FE application to process frames.

It is recommended to use a seperate private processing member function within the plugin to process data. Inside this function calling the private member function is recommended.

This function is a pure virtual function. When creating a plugin this function should be implemented in the plugin

Parameters
ininput image as a opencv mat object
outoutput image
paramsProcParams struct reference
Returns
boolean true should be return on successful completion of processing a frame, and false otherwise
See Also
inputData(), ProcParams;
virtual bool NoobaPluginAPI::release ( )
pure virtual

releases the resources used by the plugin.

This function is called before unloading the plugin. Resources that need to be released before unloading need to be done here. This functions is introduced to make plugins release its resources without distructing the loaded plugins in the application.

When reloading a plugin first release() function is called then init() is called. This is much efficient than destructing and creating plugins. If some of the state variable of the plugin needs to be preserved when reloading, that can be done by simply not releasing those variable data in release() function.

This function is a pure virtual function. When creating a plugin this function should be implemented in the plugin

See Also
init(), NoobaPluginAPI()
void NoobaPluginAPI::setFrameViewerVisibility ( const QString &  title,
bool  isVisible 
)
inline

setFrameViewerVisibility

Parameters
isVisibleseting this to true will make the viewer visible and vice versa
void NoobaPluginAPI::updateFrameViewer ( const QString &  title,
const QImage &  frame 
)
inline

updateFrameViewer

Parameters
title
frameQImage

The documentation for this class was generated from the following files: