MipAlgorithms::VisTrackCamshift Class Reference
[Visual tracking]

Class for visual tracking based on camshift algorithm. More...

#include <VisTrackCamshift.h>

Inheritance diagram for MipAlgorithms::VisTrackCamshift:

MipAlgorithms::VisualTracking

List of all members.

Public Member Functions

 VisTrackCamshift (int type, int port=0)
 Constructor with parameters.
 VisTrackCamshift (int type, IplImage *img, int port=0)
 Constructor from camera frame.
 ~VisTrackCamshift ()
 Destructor (closes displays).
virtual bool displayTrack (int addInfo=1)
 Visualizes result of tracking.
void getEstPose (Pose3D *pose)
 Gets the estimated pose of Robot.
void setEstPose (Pose3D *pose)
 Sets the estimated pose of Robot (if a more realiable one is available).
void getLastFeatureErr (ImageFeature &f)
 Gets image feature error.
void setFeatureErr (ImageFeature &f)
 Gets image feature error.
bool getFeatureErr (IplImage *frame, Time &newTime, ImageFeature &f)
 Gets image feature error.
bool trackReference (IplImage *frame, Time &newTime)
 Performs tracking of reference in the image.
void setDisplay (int level)
 Sets the level of visualization.
VisualTrackCamshiftVargetVar ()
 Gets variables class pointer.
Decimal sg_derive7_step (SavgolFilter7 *filter, Decimal angle)

Static Public Member Functions

static void VtcMouseCallback (int event, int x, int y, int flags, void *param)
 Mouse callback to make the selection (OpenCV based).


Detailed Description

Class for visual tracking based on camshift algorithm.

Author:
Lorenzo Rosa

Constructor & Destructor Documentation

MipAlgorithms::VisTrackCamshift::VisTrackCamshift ( int  type,
int  port = 0 
)

Constructor with parameters.

Parameters:
type Tipe of Algorithm: 0 = Camshift, 1 = RemoteUDP.
port UDP port for listener UDP.

MipAlgorithms::VisTrackCamshift::VisTrackCamshift ( int  type,
IplImage *  img,
int  port = 0 
)

Constructor from camera frame.

MipAlgorithms::VisTrackCamshift::~VisTrackCamshift (  ) 

Destructor (closes displays).


Member Function Documentation

void MipAlgorithms::VisTrackCamshift::VtcMouseCallback ( int  event,
int  x,
int  y,
int  flags,
void *  param 
) [static]

Mouse callback to make the selection (OpenCV based).

bool MipAlgorithms::VisTrackCamshift::displayTrack ( int  addInfo = 1  )  [virtual]

Visualizes result of tracking.

Parameters:
addInfo select the level of added information (displayed on the frame)

Implements MipAlgorithms::VisualTracking.

void MipAlgorithms::VisTrackCamshift::getEstPose ( Pose3D pose  )  [virtual]

Gets the estimated pose of Robot.

Parameters:
pose Pointer to Pose3D object.

Implements MipAlgorithms::VisualTracking.

void MipAlgorithms::VisTrackCamshift::setEstPose ( Pose3D pose  )  [virtual]

Sets the estimated pose of Robot (if a more realiable one is available).

Parameters:
pose Pointer to Pose3D object.

Implements MipAlgorithms::VisualTracking.

void MipAlgorithms::VisTrackCamshift::getLastFeatureErr ( ImageFeature f  ) 

Gets image feature error.

Parameters:
f Feature object. It will be set with actual error.

void MipAlgorithms::VisTrackCamshift::setFeatureErr ( ImageFeature f  ) 

Gets image feature error.

Parameters:
f Feature object. It will be set with actual error.

bool MipAlgorithms::VisTrackCamshift::getFeatureErr ( IplImage *  frame,
Time newTime,
ImageFeature f 
) [virtual]

Gets image feature error.

Parameters:
frame Frame to be analyzed.
newTime Timestamp of the frame.
f Feature object. It will be set with actual error.

Implements MipAlgorithms::VisualTracking.

bool MipAlgorithms::VisTrackCamshift::trackReference ( IplImage *  frame,
Time newTime 
)

Performs tracking of reference in the image.

Parameters:
frame Frame to be analyzed.
newTime Timestamp of the frame.
Returns:
True if successful, False otherwise. (Warning: Control of image not yet implemented)

TODO Control of image quality and return of bool value

void MipAlgorithms::VisTrackCamshift::setDisplay ( int  level  )  [inline, virtual]

Sets the level of visualization.

Parameters:
level 0: do not visualize anything, 1 visualizes Selection in mainFrame, 2 visualize all elaborations TODO: Create function to open and close mainframe for selection only

Implements MipAlgorithms::VisualTracking.

VisualTrackCamshiftVar* MipAlgorithms::VisTrackCamshift::getVar (  )  [inline]

Gets variables class pointer.

Reimplemented from MipAlgorithms::VisualTracking.

Decimal MipAlgorithms::VisTrackCamshift::sg_derive7_step ( SavgolFilter7 filter,
Decimal  angle 
)


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

Generated on Mon Feb 20 07:01:11 2017 for MIP by  doxygen 1.5.6