AURobotServers  4
Public Member Functions | Private Member Functions | Private Attributes | List of all members
UFuncTracking Class Reference

#include <ufunctracking.h>

Inheritance diagram for UFuncTracking:
Inheritance graph

Public Member Functions

virtual bool handleCommand (UServerInMsg *msg, void *extra)
 
 UFuncTracking ()
 
virtual ~UFuncTracking ()
 
- Public Member Functions inherited from UFunctionCamBase
virtual void createResources ()
 
UImagegetImage (UServerInMsg *msg, void *extra)
 
virtual bool setResource (UResBase *ressource, bool remove)
 
 UFunctionCamBase ()
 
virtual ~UFunctionCamBase ()
 
- Public Member Functions inherited from UFunctionImgBase
virtual void setCmdHandler (UCmdExe *cmdExe)
 
void showImagesAsDefault (bool show)
 
 UFunctionImgBase ()
 
virtual ~UFunctionImgBase ()
 
- Public Member Functions inherited from UFunctionBase
bool addResource (UResBase *resource, UFunctionBase *owner)
 
void closeLogfile ()
 
virtual const char * commandList ()
 
const char * getAliasName ()
 
const char * getLoadedFileName ()
 
void * getLoadedModuleRef ()
 
virtual bool gotAllResources (char *missingThese, int missingTheseCnt)
 
bool isMine (const char *cmdName)
 
bool isStatic ()
 is the module loaded as static A module is static if the ldFilename has a length of zero. More...
 
virtual const char * name ()
 
bool newCmd (UServerInMsg *newMsg, UDataBase *extra)
 
bool newCommand (UServerInMsg *newMsg, void *extra)
 
bool openLogfile (const char *name)
 
void print (const char *preString)
 
virtual void resourceUpdated ()
 
bool sendEndTag (UServerInMsg *msg)
 
bool sendEndTag ()
 
bool sendFullTag (const char *attributes)
 
bool sendHelpDone (UServerInMsg *msg)
 
bool sendHelpDone ()
 
bool sendHelpStart (UServerInMsg *msg, const char *subject)
 
bool sendHelpStart (const char *subject)
 
bool sendHelpStart ()
 
bool sendMsg (UServerInMsg *msg, const char *message, int size)
 
bool sendMsg (const char *message)
 
bool sendMsg (UServerInMsg *msg, const char *message)
 
bool sendMsg (int clientIdx, const char *message, int size)
 
bool sendMsgInt (int clientIdx, const char *message)
 
bool sendStartTag (const char *attributes)
 
bool sendText (UServerInMsg *msg, const char *text)
 
bool sendText (const char *text)
 
virtual void setAliasName (const char *name)
 
virtual void setCommand (const char *cmdList, const char *name, const char *note)
 
void setLoadedModuleRef (void *module, const char *moduleFileName)
 
virtual void setLoadTime (UTime)
 
void setName (const char *name)
 
void setVerbose (bool value)
 
 UFunctionBase ()
 
virtual ~UFunctionBase ()
 
- Public Member Functions inherited from UCallBack
bool addOnEvent (UOnEvent *dataObject)
 
virtual bool onEvent (const char *interface, const char *dataType, void *data)
 
 UCallBack ()
 
virtual ~UCallBack ()
 
- Public Member Functions inherited from UResVarPool
int addMethod (const char *formalName, const char *paramTypes, const char *comment)
 
int addMethodV (const char *formalName, const char *paramTypes, const char *comment)
 
UVarPooladdStruct (const char *name, const char *comment, bool copy=false)
 
UVariableaddVar (const char *name, const double initialValue, const char *type, const char *comment)
 
UVariableaddVar (const char *name, const char *initialValue, const char *type, const char *comment)
 
UVariableaddVarA (const char *name, const char *initialValue, const char *type, const char *comment)
 
bool callGlobal (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt)
 
bool callGlobalV (const char *name, const char *paramOrder, UVariable **params, UDataBase **returnStruct, int *returnStructCnt)
 Call a method from the root var pool scope It may be in the structure direct (no '.') or in any sub-structure that the 'name.subname' indicate. More...
 
bool callLocal (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt)
 
bool callVS (const char *function, const char *stringParam)
 
int callVSCD (const char *function, const char *strPar, UDataBase *data, int cooSys)
 
void createBaseVar ()
 
virtual bool createVarSpace (const int varCnt, const int structCnt, const int methCnt, const char *note, bool copy=false)
 
bool getGlobalString (const char *name, const char **value)
 
bool getGlobalValue (const char *name, double *value)
 
bool getGlobalValue (const char *name, const char **value)
 
bool getGlobalValue (const char *name, bool *value)
 
bool getGlobalValue (const char *name, UTime *value)
 
bool getLocalValue (const char *name, double *value)
 get a value in this variable tree More...
 
bool getLocalValue (const char *name, bool *value)
 
bool getLocalValue (const char *name, UTime *value)
 
double getLocalValue (int idx)
 
UPosition getLocalValue3D (int idx)
 
UPosRot getLocalValue6D (int idx)
 
bool getLocalValueBool (int idx)
 
int getLocalValueInt (int idx)
 
UTime getLocalValueTime (int idx)
 
const char * getLogFileName ()
 
const char * getVarDescription (int idx)
 
UVarCalcgetVarPool ()
 
bool isLogFileOpen ()
 
bool isLogFileOpen (const char *structName)
 
bool isVarPoolUpdated (int lastCnt, int *newCnt)
 
void logFileClose ()
 
bool logFileOpen ()
 
void logFileStart (const char *structName, bool open)
 
virtual bool methodCall (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct=NULL, int *returnStructCnt=NULL)
 
virtual const char * print (const char *preString, char *buff, int buffCnt)
 
bool setGlobalVar (const char *name, const double value, bool mayAdd)
 Assigns a value to a variable. The variable may be a part of a structure. More...
 
bool setLocalVar (int idx, double value, const int element)
 
bool setLocalVar (const char *name, const double value, bool mayAdd)
 Assigns a value to a variable. The variable may be a part of a structure. More...
 
bool setLocalVar3D (int idx, UPosition *value)
 
bool setLocalVar6D (int idx, UPosRot *value)
 
bool setLocalVarAdd (int idx, double value, const int element)
 
bool setLocalVarPose (int idx, UPose *value)
 
void setVarPool (UVarCalc *sharedVarPool)
 
int updateQTvars (int structIdx)
 
 UResVarPool ()
 
virtual ~UResVarPool ()
 
- Public Member Functions inherited from UResBase
void createReplayVar (UVarPool *pool)
 
UCmdExegetCorePointer ()
 
char * getLogFileName (char *fn, const int fnCnt)
 
int getResFuncIdx ()
 
const char * getResID ()
 
int getResVersion ()
 
bool isA (const char *idStr)
 
bool isAlsoA (const char *id)
 
virtual void saveSettings ()
 
void setCorePointer (UCmdExe *serverCore)
 
void setResFuncIdx (int idx)
 
virtual void setResID (const char *id, const int version)
 
virtual void stop (bool)
 
virtual void updateReplayStatus ()
 
 UResBase ()
 
virtual ~UResBase ()
 
- Public Member Functions inherited from UReplay
void addChild (UReplay *child)
 
virtual bool decodeReplayLine (char *)
 
char * getLogFileName (char *fn, const int fnCnt)
 
char * getReplayFileName (char *fn, const int fnCnt)
 
int getReplayLogLine ()
 
bool isReplay ()
 
bool isReplayFileOpen ()
 
void removeChild (UReplay *child)
 
virtual void replayAdvanceTime (UTime untilTime)
 
void replaySetBaseFileName (const char *name, const char *preName="")
 
void replaySetFileName (const char *name)
 
virtual bool replayStep ()
 
int replayStep (int steps)
 
virtual bool replayToTime (UTime untilTime)
 
void setParent (UReplay *parent)
 
bool setReplay (bool value)
 
 UReplay ()
 
virtual ~UReplay ()
 
- Public Member Functions inherited from ULock
bool lock ()
 
void lockInit ()
 
void post ()
 
bool tryLock ()
 
bool tryWait ()
 
 ULock ()
 
void unlock ()
 
bool wait ()
 
 ~ULock ()
 
- Public Member Functions inherited from UVarMethodImplement
virtual bool methodCallV (const char *name, const char *paramOrder, UVariable *params[], UDataBase **returnStruct, int *returnStructCnt)
 
virtual ~UVarMethodImplement ()
 

Private Member Functions

void assign_color_cluster (int index)
 
void assign_color_human (int index)
 
void assign_color_smr (int index)
 
void build_tree_cluster (const boost::filesystem::path &path, int i)
 
void build_tree_human (const boost::filesystem::path &path)
 
void build_tree_smr (const boost::filesystem::path &path)
 
void build_tree_static (const boost::filesystem::path &path, int i)
 
void call_tree_cluster (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cluster, pcl::PointCloud< pcl::VFHSignature308 >::Ptr vfhsi, int i)
 
float cluster_color (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud)
 
float cluster_colorS (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud)
 
void clustering (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud_filtered, OBJ obj_img[], std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *cluster)
 
void clustering_floor (pcl::PointCloud< pcl::PointXYZRGB >::Ptr *cloud_filtered)
 
void createBaseVar ()
 
void descriptor_human (int k, vfh_model histogram, flann::Matrix< int > &k_indices, flann::Matrix< float > &k_distances)
 
void descriptor_smr (int k, vfh_model histogram, flann::Matrix< int > &k_indices, flann::Matrix< float > &k_distances)
 
void dominant_color (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, float *HMean, float *SMean)
 
void downsampling (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud_ini, pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud_filtered)
 
void estimating_normals (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, pcl::PointCloud< pcl::Normal >::Ptr cloud_normals)
 
void estimating_normals_human (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, pcl::PointCloud< pcl::Normal >::Ptr cloud_normals)
 
void estimating_normals_smr (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, pcl::PointCloud< pcl::Normal >::Ptr cloud_normals)
 
void estimating_vfh (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, pcl::PointCloud< pcl::VFHSignature308 >::Ptr vfhs)
 
void estimating_vfh_human (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, pcl::PointCloud< pcl::VFHSignature308 >::Ptr vfhs)
 
void estimating_vfh_smr (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, pcl::PointCloud< pcl::VFHSignature308 >::Ptr vfhs)
 
void FirstImage (void)
 
void GetKinectPointCloudDataRGB (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud)
 
void loadFeatureModels (const boost::filesystem::path &base_dir, const std::string &extension, std::vector< vfh_model > &models)
 
bool loadFileList (std::vector< vfh_model > &models, const std::string &filename)
 Load the list of file model names from an ASCII file. More...
 
bool loadHist (const boost::filesystem::path &path, vfh_model &vfh)
 Loads an n-D histogram file as a VFH signature. More...
 
void matching (int *match, int human_next, int smr_next, pcl::PointCloud< pcl::PointXYZRGB >::Ptr big_cloud, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *matched_next, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *new_smr, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *new_human, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > pos_human_next, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > pos_smr_next, color color_matched[], color color_new_smr[], color color_new_human[])
 
void nearest_neighbors_cluster (const boost::filesystem::path &path, pcl::PointCloud< pcl::VFHSignature308 >::Ptr vfhsi, pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, pcl::PointCloud< pcl::PointXYZRGB >::Ptr big_cloud, flann::Matrix< int > &k_indices, flann::Matrix< float > &k_distances, int place, int *pos)
 
void nearest_neighbors_human (const boost::filesystem::path &path, flann::Matrix< int > &k_indices, flann::Matrix< float > &k_distances)
 
void nearest_neighbors_smr (const boost::filesystem::path &path, flann::Matrix< int > &k_indices, flann::Matrix< float > &k_distances)
 
void nearestKSearch (flann::Index< flann::ChiSquareDistance< float > > &index, const vfh_model &model, int k, flann::Matrix< int > &indices, flann::Matrix< float > &distances)
 Search for the closest k neighbors. More...
 
void object_classification (OBJ obj_img[], std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > pre_cluster, pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *pos_human, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *pos_smr, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *pos_rest, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *matched_cluster, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *static_cluster, int *human, int *smr, int *rest, int *matchcluster, color color_cluster[])
 
void object_classification_frame1 (OBJ obj_img[], std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > pre_cluster)
 
void object_visualization (pcl::visualization::PCLVisualizer *viewer, pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > matched_next, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > matched_cluster, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > smr_new, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > human_new, std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > cluster_new, color color_matched[], color color_cluster[], color color_new_smr[], color color_new_human[], int *added)
 
void removeAllText3D (int add, int matchcluster, pcl::visualization::PCLVisualizer *viewer)
 
void RGB2HSV (int r, int g, int b, float &fh, float &fs, float &fv)
 
void TrackObjects (void)
 
void update_file_cluster_color (int i)
 
void update_file_cluster_position (int i)
 
void update_file_human_color (int i)
 
void update_file_human_expected (int i)
 
void update_file_human_match (std::vector< vfh_model > models, flann::Matrix< int > k_indices, flann::Matrix< float > &k_distances)
 
void update_file_human_position (int i)
 
void update_file_robot_position (int i)
 
void update_file_smr_color (int i)
 
void update_file_smr_expected (int i)
 
void update_file_smr_position (int i)
 
void update_file_static_color (int i)
 
void update_file_static_position (int i)
 
void update_file_time_calculation (int i)
 
void update_file_time_tree (int i)
 
void visualization_neighbors (flann::Matrix< int > &k_indices, flann::Matrix< float > &k_distances)
 
void visualize_front_page (pcl::visualization::PCLVisualizer *viewer, pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud)
 
void visualize_static (pcl::visualization::PCLVisualizer *viewer, pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud)
 

Private Attributes

UVariablevarKinectMapPool
 
UVariablevarMaxMapX
 
UVariablevarMaxMapY
 
UVariablevarMinMapX
 resulting map limits More...
 
UVariablevarMinMapY
 
UVariablevarPlaneHeight
 
UVariablevarRobotHeight
 
UVariablevarShowFloorPlane
 
UVariablevarShowRoof
 
UVariablevarSquareSize
 
pcl::visualization::PCLVisualizer * viewer
 

Additional Inherited Members

- Static Public Member Functions inherited from UResVarPool
static const char * getResClassID ()
 
- Public Attributes inherited from UFunctionBase
bool silent
 is reply to client and console to be limited More...
 
- Public Attributes inherited from UReplay
bool replayTimeAdvancePending
 
UTime replayTimeNow
 
- Static Public Attributes inherited from UFunctionBase
static const int MAX_ID_LENGTH = 30
 
static const int MAX_RESOURCE_LIST_SIZE = 250
 
- Protected Member Functions inherited from UFunctionCamBase
UCamPushgetCam (int imgDevice, const char *posName)
 
UCamPushgetCam (int camDevNum)
 
bool getCamAndRawImage (UCamPush **cam, UImage **imgRaw, int *imgDevice, void *imgBase, const char *posName, int rectfiedImg)
 
int getDefaultCamDevice ()
 
- Protected Member Functions inherited from UFunctionImgBase
bool sendImage (UServerInMsg *msg, const char *tagName, UImage *imgRgb, int imgLeft=0, int imgTop=0, int imgWidth=640, int imgHeight=480, int imgSource=-1, bool isCodecBin=true, bool imgIsBW=false, bool imgGetNum=true, bool imgGetTod=true, bool imgGetTime=false, const char *posName=NULL, bool imgGetName=true, bool silent=false)
 
- Protected Member Functions inherited from UFunctionBase
int getCmdIndex ()
 
UResBasegetStaticResource (const char *resName, bool mayCreate, bool staticOnly=true)
 get a pointer to a static resource. More...
 
bool isClientAlive (int clientIdx, double holdOffTime)
 
bool sendDebug (UServerInMsg *msg, const char *debugText)
 
bool sendDebug (const char *debugText)
 
bool sendError (UServerInMsg *msg, const char *errorText)
 
bool sendError (const char *errorText)
 
bool sendHelp (UServerInMsg *msg, const char *infoText)
 
bool sendHelp (const char *infoText)
 
bool sendInfo (UServerInMsg *msg, const char *infoText)
 
bool sendInfo (const char *infoText)
 
bool sendWarning (UServerInMsg *msg, const char *warningText)
 
bool sendWarning (const char *warningText)
 
UResBasesetThisResource (const char *ID, UResBase *resource, bool remove, bool *changed, UResBase *currentResPtr, bool *isLocal)
 
- Protected Member Functions inherited from UResVarPool
void setDescription (const char *note, bool copy=false)
 
- Protected Member Functions inherited from UResBase
UResBasegetStaticResource (const char *resName, bool mayCreate, bool staticOnly=true)
 get a pointer to a static resource. More...
 
- Protected Attributes inherited from UFunctionCamBase
UCamPoolcamPool
 
- Protected Attributes inherited from UFunctionImgBase
UImagePoolimgPool
 
- Protected Attributes inherited from UFunctionBase
char aliasName [MAX_ID_LENGTH]
 
UCmdExecmdHandler
 
char * cmdToks [20]
 
int cmdToksCnt
 
char commandsHandled [MAX_RESOURCE_LIST_SIZE]
 
UServerInMsgmsg
 
char pluginName [MAX_RESOURCE_LIST_SIZE]
 
bool verboseMessages
 
- Protected Attributes inherited from UResBase
int resFuncIdx
 
char resID [MAX_RESOURCE_ID_LENGTH]
 
char resIsAlso [MAX_RESOURCE_ISALSO_LENGTH]
 
int resVersion
 
- Protected Attributes inherited from UReplay
bool replay
 
FILE * replayFile
 
char replayFileName [REPLAY_FILE_NAME_LENGTH]
 replay filename More...
 
char replayLine [MAX_LOG_LINE_LENGTH]
 
int replayLogLine
 
UReplayreplayParent
 
UTime replayTimeNext
 
- Static Protected Attributes inherited from UReplay
static const int MAX_LOG_LINE_LENGTH = 10000
 
static const int REPLAY_FILE_NAME_LENGTH = 264
 max length of replay filename More...
 

Detailed Description

Example plugin that demonstrates a plugin that tracks humans, SMRs and other objects.

Author
Christian Andersen & Albert Navarro

Constructor & Destructor Documentation

UFuncTracking::UFuncTracking ( )
inline

Constructor

References viewer.

UFuncTracking::~UFuncTracking ( )
virtual

Destructor

Member Function Documentation

void UFuncTracking::assign_color_cluster ( int  index)
private

assigning a color to the cluster for representing it later on

References DETECTED::b, CD, DETECTED::g, LASTCOLORCLUSTER, and DETECTED::r.

Referenced by object_classification(), and object_classification_frame1().

void UFuncTracking::assign_color_human ( int  index)
private

assigning a color to the human for representing it later on

References DETECTED::b, DETECTED::g, HD, LASTCOLORHUMAN, and DETECTED::r.

Referenced by matching(), and object_classification_frame1().

void UFuncTracking::assign_color_smr ( int  index)
private

assigning a color to the smr for representing it later on

References DETECTED::b, DETECTED::g, LASTCOLORSMR, DETECTED::r, and SD.

Referenced by matching(), and object_classification_frame1().

void UFuncTracking::build_tree_cluster ( const boost::filesystem::path &  path,
int  i 
)
private

builds the kdtree structure of a Cluster descriptor

References data, and loadFeatureModels().

Referenced by call_tree_cluster(), and nearest_neighbors_cluster().

void UFuncTracking::build_tree_human ( const boost::filesystem::path &  path)
private

builds the kdtree structure of the HUMAN descriptor

References data, and loadFeatureModels().

Referenced by FirstImage(), object_classification(), and object_classification_frame1().

void UFuncTracking::build_tree_smr ( const boost::filesystem::path &  path)
private

builds the kdtree structure of the SMR descriptor

References data, and loadFeatureModels().

Referenced by FirstImage(), object_classification(), and object_classification_frame1().

void UFuncTracking::build_tree_static ( const boost::filesystem::path &  path,
int  i 
)
private

builds the kdtree structure of a Static descriptor

References data, and loadFeatureModels().

Referenced by nearest_neighbors_cluster().

void UFuncTracking::call_tree_cluster ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cluster,
pcl::PointCloud< pcl::VFHSignature308 >::Ptr  vfhsi,
int  i 
)
private
float UFuncTracking::cluster_color ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud)
private

finds the Hue color of a cluster

References RGB2HSV().

Referenced by clustering(), nearest_neighbors_cluster(), and object_classification().

float UFuncTracking::cluster_colorS ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud)
private

finds de Saturation color of a cluster

References RGB2HSV().

Referenced by clustering(), and object_classification().

void UFuncTracking::clustering ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud_filtered,
OBJ  obj_img[],
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *  cluster 
)
private
void UFuncTracking::clustering_floor ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr *  cloud_filtered)
private

clustering the floor

References FLOOR.

Referenced by FirstImage(), and TrackObjects().

void UFuncTracking::createBaseVar ( )
private

Create create globally available status and configuration variables

void UFuncTracking::descriptor_human ( int  k,
vfh_model  histogram,
flann::Matrix< int > &  k_indices,
flann::Matrix< float > &  k_distances 
)
private

creates the descriptor of a human

References data, loadFileList(), and nearestKSearch().

void UFuncTracking::descriptor_smr ( int  k,
vfh_model  histogram,
flann::Matrix< int > &  k_indices,
flann::Matrix< float > &  k_distances 
)
private

creates the descriptor of a SMR

References data, loadFileList(), and nearestKSearch().

void UFuncTracking::dominant_color ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud,
float *  HMean,
float *  SMean 
)
private

finds the dominant color of a cluster

References RGB2HSV().

Referenced by matching(), nearest_neighbors_cluster(), and object_classification_frame1().

void UFuncTracking::downsampling ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud_ini,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud_filtered 
)
private

downsamples the image

References lxyz.

Referenced by FirstImage(), and TrackObjects().

void UFuncTracking::estimating_normals ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud,
pcl::PointCloud< pcl::Normal >::Ptr  cloud_normals 
)
private

estimates normals of the cluster

Referenced by estimating_vfh().

void UFuncTracking::estimating_normals_human ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud,
pcl::PointCloud< pcl::Normal >::Ptr  cloud_normals 
)
private

estimates normals of a human

Referenced by estimating_vfh_human().

void UFuncTracking::estimating_normals_smr ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud,
pcl::PointCloud< pcl::Normal >::Ptr  cloud_normals 
)
private

estimates normals of a SMR

Referenced by estimating_vfh_smr().

void UFuncTracking::estimating_vfh ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud,
pcl::PointCloud< pcl::VFHSignature308 >::Ptr  vfhs 
)
private

estimating the vfh cluster

References estimating_normals().

Referenced by object_classification(), and object_classification_frame1().

void UFuncTracking::estimating_vfh_human ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud,
pcl::PointCloud< pcl::VFHSignature308 >::Ptr  vfhs 
)
private

estimating the vfh human

References estimating_normals_human().

Referenced by object_classification(), and object_classification_frame1().

void UFuncTracking::estimating_vfh_smr ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud,
pcl::PointCloud< pcl::VFHSignature308 >::Ptr  vfhs 
)
private

estimating the vfh smr

References estimating_normals_smr().

Referenced by object_classification(), and object_classification_frame1().

void UFuncTracking::FirstImage ( void  )
private
void UFuncTracking::GetKinectPointCloudDataRGB ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud)
private

Get kinect pointcloud data from the image pool RGB

References UResVarPool::callGlobal().

Referenced by FirstImage(), and TrackObjects().

bool UFuncTracking::handleCommand ( UServerInMsg msg,
void *  extra 
)
virtual

Handle incomming command Must return true if the function is handled - otherwise the client will get a 'failed' reply

Reimplemented from UFunctionBase.

References USmlTagIn::getAttValue(), USmlTagIn::getAttValueBool(), USmlTagIn::getAttValueInt(), UFunctionBase::sendHelpDone(), UFunctionBase::sendHelpStart(), UFunctionBase::sendInfo(), UFunctionBase::sendText(), UServerInMsg::tag, and TrackObjects().

void UFuncTracking::loadFeatureModels ( const boost::filesystem::path &  base_dir,
const std::string &  extension,
std::vector< vfh_model > &  models 
)
private

loads the models

References loadHist().

Referenced by build_tree_cluster(), build_tree_human(), build_tree_smr(), and build_tree_static().

bool UFuncTracking::loadFileList ( std::vector< vfh_model > &  models,
const std::string &  filename 
)
private

Load the list of file model names from an ASCII file.

loads the file .list

Parameters
modelsthe resultant list of model name
filenamethe input file name

References UResBase::line.

Referenced by descriptor_human(), descriptor_smr(), nearest_neighbors_cluster(), nearest_neighbors_human(), and nearest_neighbors_smr().

bool UFuncTracking::loadHist ( const boost::filesystem::path &  path,
vfh_model vfh 
)
private

Loads an n-D histogram file as a VFH signature.

load a Histogram

Parameters
paththe input file name
vfhthe resultant VFH model

References nearestKSearch().

Referenced by loadFeatureModels(), nearest_neighbors_cluster(), nearest_neighbors_human(), and nearest_neighbors_smr().

void UFuncTracking::matching ( int *  match,
int  human_next,
int  smr_next,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  big_cloud,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *  matched_next,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *  new_smr,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *  new_human,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr >  pos_human_next,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr >  pos_smr_next,
color  color_matched[],
color  color_new_smr[],
color  color_new_human[] 
)
private
void UFuncTracking::nearest_neighbors_cluster ( const boost::filesystem::path &  path,
pcl::PointCloud< pcl::VFHSignature308 >::Ptr  vfhsi,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  big_cloud,
flann::Matrix< int > &  k_indices,
flann::Matrix< float > &  k_distances,
int  place,
int *  pos 
)
private
void UFuncTracking::nearest_neighbors_human ( const boost::filesystem::path &  path,
flann::Matrix< int > &  k_indices,
flann::Matrix< float > &  k_distances 
)
private

calculates the nearest neighbors of a Human

References data, loadFileList(), loadHist(), nearestKSearch(), and update_file_human_match().

Referenced by object_classification(), and object_classification_frame1().

void UFuncTracking::nearest_neighbors_smr ( const boost::filesystem::path &  path,
flann::Matrix< int > &  k_indices,
flann::Matrix< float > &  k_distances 
)
private

calculates the nearest neighbors of a SMR

References data, loadFileList(), loadHist(), and nearestKSearch().

Referenced by object_classification(), and object_classification_frame1().

void UFuncTracking::nearestKSearch ( flann::Index< flann::ChiSquareDistance< float > > &  index,
const vfh_model model,
int  k,
flann::Matrix< int > &  indices,
flann::Matrix< float > &  distances 
)
inlineprivate

Search for the closest k neighbors.

searches for the K nearest neighbors

Parameters
indexthe tree
modelthe query model
kthe number of neighbors to search for
indicesthe resultant neighbor indices
distancesthe resultant neighbor distances

Referenced by descriptor_human(), descriptor_smr(), loadHist(), nearest_neighbors_cluster(), nearest_neighbors_human(), and nearest_neighbors_smr().

void UFuncTracking::object_classification ( OBJ  obj_img[],
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr >  pre_cluster,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *  pos_human,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *  pos_smr,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *  pos_rest,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *  matched_cluster,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr > *  static_cluster,
int *  human,
int *  smr,
int *  rest,
int *  matchcluster,
color  color_cluster[] 
)
private
void UFuncTracking::object_classification_frame1 ( OBJ  obj_img[],
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr >  pre_cluster 
)
private
void UFuncTracking::object_visualization ( pcl::visualization::PCLVisualizer *  viewer,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr >  matched_next,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr >  matched_cluster,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr >  smr_new,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr >  human_new,
std::vector< pcl::PointCloud< pcl::PointXYZRGB >::Ptr >  cluster_new,
color  color_matched[],
color  color_cluster[],
color  color_new_smr[],
color  color_new_human[],
int *  added 
)
private

visualization of all the objects, but the Static ones

References color::b, color::g, color::r, and STATIC.

Referenced by TrackObjects().

void UFuncTracking::removeAllText3D ( int  add,
int  matchcluster,
pcl::visualization::PCLVisualizer *  viewer 
)
private

remove all3DText

Referenced by TrackObjects().

void UFuncTracking::RGB2HSV ( int  r,
int  g,
int  b,
float &  fh,
float &  fs,
float &  fv 
)
private

converts RGB color format to HSV

Referenced by cluster_color(), cluster_colorS(), clustering(), and dominant_color().

void UFuncTracking::TrackObjects ( void  )
private
void UFuncTracking::update_file_cluster_color ( int  i)
private
void UFuncTracking::update_file_cluster_position ( int  i)
private

files with position, color and times of the clusters for Matlab representation

References CD, and DETECTED::COG.

Referenced by nearest_neighbors_cluster(), and object_classification_frame1().

void UFuncTracking::update_file_human_color ( int  i)
private
void UFuncTracking::update_file_human_expected ( int  i)
private
void UFuncTracking::update_file_human_match ( std::vector< vfh_model models,
flann::Matrix< int >  k_indices,
flann::Matrix< float > &  k_distances 
)
private

Referenced by nearest_neighbors_human().

void UFuncTracking::update_file_human_position ( int  i)
private

References DETECTED::COG, and HD.

Referenced by matching(), and object_classification_frame1().

void UFuncTracking::update_file_robot_position ( int  i)
private

References X, Y, and YAW.

Referenced by FirstImage(), and TrackObjects().

void UFuncTracking::update_file_smr_color ( int  i)
private
void UFuncTracking::update_file_smr_expected ( int  i)
private
void UFuncTracking::update_file_smr_position ( int  i)
private

References DETECTED::COG, and SD.

Referenced by matching(), and object_classification_frame1().

void UFuncTracking::update_file_static_color ( int  i)
private
void UFuncTracking::update_file_static_position ( int  i)
private

References DETECTED::COG, and STD.

Referenced by clustering(), and nearest_neighbors_cluster().

void UFuncTracking::update_file_time_calculation ( int  i)
private
void UFuncTracking::update_file_time_tree ( int  i)
private
void UFuncTracking::visualization_neighbors ( flann::Matrix< int > &  k_indices,
flann::Matrix< float > &  k_distances 
)
private

show the closest neighbors after the search

void UFuncTracking::visualize_front_page ( pcl::visualization::PCLVisualizer *  viewer,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud 
)
private

visualization function to obtain 1 out 4 representations of the path followed by a human

References HP, humancount, and PICTURE::suma.

void UFuncTracking::visualize_static ( pcl::visualization::PCLVisualizer *  viewer,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud 
)
private

visualization of static objects

References DETECTED::empty, UTime::getTimePassed(), STATIC, STD, and DETECTED::t.

Referenced by TrackObjects().

Member Data Documentation

UVariable* UFuncTracking::varKinectMapPool
private
UVariable* UFuncTracking::varMaxMapX
private
UVariable* UFuncTracking::varMaxMapY
private
UVariable* UFuncTracking::varMinMapX
private

resulting map limits

UVariable* UFuncTracking::varMinMapY
private
UVariable* UFuncTracking::varPlaneHeight
private
UVariable* UFuncTracking::varRobotHeight
private
UVariable* UFuncTracking::varShowFloorPlane
private
UVariable* UFuncTracking::varShowRoof
private
UVariable* UFuncTracking::varSquareSize
private
pcl::visualization::PCLVisualizer* UFuncTracking::viewer
private

Referenced by FirstImage(), and TrackObjects().


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