MRPT  2.0.4
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
mrpt::obs::CObservation::Ptr
std::shared_ptr< CObservation > Ptr
Definition: CObservation.h:45
mrpt::detectors::CObjectDetection::init
void init(const std::string &configFile)
Initialize the object with parameters loaded from the given config file.
Definition: CObjectDetection.h:26
mrpt::detectors
Definition: CCascadeClassifierDetection.h:15
CConfigFile.h
mrpt::detectors::CObjectDetection::detectObjects_Impl
virtual void detectObjects_Impl(const mrpt::obs::CObservation &obs, vector_detectable_object &detected)=0
mrpt::detectors::CObjectDetection::init
virtual void init(const mrpt::config::CConfigFileBase &cfg)=0
Initialize the object with parameters loaded from the given config source.
mrpt::detectors::CObjectDetection
Definition: CObjectDetection.h:22
mrpt::detectors::CObjectDetection::detectObjects
void detectObjects(const mrpt::obs::CObservation::Ptr obs, vector_detectable_object &detected)
Definition: CObjectDetection.h:36
mrpt::config::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: config/CConfigFileBase.h:45
mrpt::img::CImage
A class for storing images as grayscale or RGB bitmaps.
Definition: img/CImage.h:149
mrpt::detectors::vector_detectable_object
std::vector< CDetectableObject::Ptr > vector_detectable_object
Definition: CObjectDetection.h:18
mrpt::detectors::CObjectDetection::detectObjects
void detectObjects(const mrpt::obs::CObservation &obs, vector_detectable_object &detected)
Definition: CObjectDetection.h:43
mrpt::config::CConfigFile
This class allows loading and storing values and vectors of different types from "....
Definition: config/CConfigFile.h:32
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:44
CImage.h
CDetectableObject.h



Page generated by Doxygen 1.8.18 for MRPT 2.0.4 at Thu Sep 24 07:14:18 UTC 2020