Main MRPT website > C++ reference
MRPT logo
CObjectDetection.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | The Mobile Robot Programming Toolkit (MRPT) C++ library |
3  | |
4  | http://www.mrpt.org/ |
5  | |
6  | Copyright (C) 2005-2012 University of Malaga |
7  | |
8  | This software was written by the Machine Perception and Intelligent |
9  | Robotics Lab, University of Malaga (Spain). |
10  | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11  | |
12  | This file is part of the MRPT project. |
13  | |
14  | MRPT is free software: you can redistribute it and/or modify |
15  | it under the terms of the GNU General Public License as published by |
16  | the Free Software Foundation, either version 3 of the License, or |
17  | (at your option) any later version. |
18  | |
19  | MRPT is distributed in the hope that it will be useful, |
20  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
21  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22  | GNU General Public License for more details. |
23  | |
24  | You should have received a copy of the GNU General Public License |
25  | along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26  | |
27  +---------------------------------------------------------------------------+ */
28 
29 
30 #ifndef CObjectDetection_H
31 #define CObjectDetection_H
32 
34 #include <mrpt/utils/CConfigFile.h>
35 #include <mrpt/utils/CImage.h>
36 
37 namespace mrpt
38 {
39  namespace detectors
40  {
41  using namespace std;
42  using namespace mrpt::slam;
43  using namespace mrpt::utils;
44 
45  typedef std::vector<CDetectableObjectPtr> vector_detectable_object;
46 
47  /** \ingroup mrpt_detectors_grp */
49  {
50  public:
51  //virtual ~CObjectDetection();
52 
53  /** Initialize the object with parameters loaded from the given config file. */
54  inline void init(const std::string &configFile)
55  {
56  mrpt::utils::CConfigFile cfg(configFile);
57  init(cfg);
58  }
59 
60  /** Initialize the object with parameters loaded from the given config source. */
61  virtual void init(const mrpt::utils::CConfigFileBase &cfg )=0;
62 
63  inline void detectObjects(const CObservationPtr obs, vector_detectable_object &detected)
64  {
65  detectObjects_Impl(obs.pointer(), detected);
66  };
67 
68  inline void detectObjects( const CObservation *obs, vector_detectable_object &detected)
69  {
70  detectObjects_Impl( obs, detected );
71  };
72 
73  void detectObjects(const CImage *img, vector_detectable_object &detected);
74 
75  protected:
76 
77  virtual void detectObjects_Impl( const CObservation *obs, vector_detectable_object &detected) = 0;
78 
79  }; // End of class
80  }
81 
82 }
83 
84 #endif
85 
86 
87 
88 



Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013