karma
All Modules
utils.h
1 /*
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
3  * Author: Vadim Tikhanoff Ugo Pattacini
4  * email: vadim.tikhanoff@iit.it
5  * Permission is granted to copy, distribute, and/or modify this program
6  * under the terms of the GNU General Public License, version 2 or any
7  * later version published by the Free Software Foundation.
8  *
9  * A copy of the license can be found at
10  * http://www.robotcub.org/icub/license/gpl.txt
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15  * Public License for more details
16 */
17 
18 #ifndef __UTILS_H__
19 #define __UTILS_H__
20 
21 #include <string>
22 
23 #include <opencv2/opencv.hpp>
24 
25 #include <yarp/os/Bottle.h>
26 #include <yarp/os/BufferedPort.h>
27 #include <yarp/os/PeriodicThread.h>
28 #include <yarp/os/PortReport.h>
29 
30 class Manager; //forward declaration
31 
32 /**********************************************************/
33 class MotionFeatures : public yarp::os::BufferedPort<yarp::os::Bottle>
34 {
35 protected:
36  Manager *manager;
37  void onRead(yarp::os::Bottle &b);
38 public:
39  MotionFeatures();
40  void setManager(Manager *manager);
41  bool getFeatures();
42 };
43 /**********************************************************/
44 class ParticleFilter : public yarp::os::BufferedPort<yarp::os::Bottle>
45 {
46 protected:
47  cv::Point loc;
48  void onRead(yarp::os::Bottle &b);
49 public:
50  ParticleFilter();
51  bool getTraker(cv::Point &loc);
52 };
53 /**********************************************************/
54 class SegmentationPoint : public yarp::os::Port
55 {
56 public:
57  void segment(yarp::os::Bottle &b);
58 };
59 /**********************************************************/
60 #endif