MRPT  1.9.9
CObjectDetection.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
14 #include <mrpt/img/CImage.h>
15 
16 namespace mrpt::detectors
17 {
18 using vector_detectable_object = std::vector<CDetectableObject::Ptr>;
19 
20 /** \ingroup mrpt_detectors_grp */
22 {
23  public:
24  /** Initialize the object with parameters loaded from the given config file.
25  */
26  inline void init(const std::string& configFile)
27  {
28  mrpt::config::CConfigFile cfg(configFile);
29  init(cfg);
30  }
31 
32  /** Initialize the object with parameters loaded from the given config
33  * source. */
34  virtual void init(const mrpt::config::CConfigFileBase& cfg) = 0;
35 
36  inline void detectObjects(
38  vector_detectable_object& detected)
39  {
40  detectObjects_Impl(*obs, detected);
41  };
42 
43  inline void detectObjects(
45  {
46  detectObjects_Impl(obs, detected);
47  };
48 
49  void detectObjects(
50  const mrpt::img::CImage* img, vector_detectable_object& detected);
51 
52  protected:
53  virtual void detectObjects_Impl(
54  const mrpt::obs::CObservation& obs,
55  vector_detectable_object& detected) = 0;
56 
57 }; // End of class
58 } // namespace mrpt::detectors
This class allows loading and storing values and vectors of different types from ".ini" files easily.
std::vector< CDetectableObject::Ptr > vector_detectable_object
void detectObjects(const mrpt::obs::CObservation &obs, vector_detectable_object &detected)
This class allows loading and storing values and vectors of different types from a configuration text...
void init(const std::string &configFile)
Initialize the object with parameters loaded from the given config file.
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
virtual void detectObjects_Impl(const mrpt::obs::CObservation &obs, vector_detectable_object &detected)=0
void detectObjects(const mrpt::obs::CObservation::Ptr obs, vector_detectable_object &detected)
A class for storing images as grayscale or RGB bitmaps.
Definition: img/CImage.h:148



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020