Image Component Library (ICL)
ObjectEdgeDetector.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLGeom/src/ICLGeom/ObjectEdgeDetector.h **
10 ** Module : ICLGeom **
11 ** Authors: Andre Ueckermann **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLGeom/GeomDefs.h>
35 #include <ICLCore/Img.h>
36 #include <ICLGeom/Camera.h>
37 #include <ICLUtils/Uncopyable.h>
38 #include <ICLCore/DataSegment.h>
39 
41 
42 namespace icl{
43  namespace geom{
44 
53 
54  struct Data;
55  Data *m_data;
56 
57  public:
58 
59  enum Mode {BEST, GPU, CPU};
60 
62 
65  ObjectEdgeDetector(Mode mode=BEST);
66 
68  virtual ~ObjectEdgeDetector();
69 
71 
77  const core::Img8u &calculate(const core::Img32f &depthImage, bool filter, bool average, bool gauss);
78 
80 
81  void setDepthImage(const core::Img32f &depthImg);
82 
84 
85  void applyMedianFilter();
86 
88 
89  const core::Img32f &getFilteredDepthImage();
90 
92 
94  void setFilteredDepthImage(const core::Img32f &filteredImg);
95 
97 
99  void applyNormalCalculation();
100 
102 
106  void applyLinearNormalAveraging();
107 
109 
115  void applyGaussianNormalSmoothing();
116 
118 
119  const core::DataSegment<float,4> getNormals();
120 
122 
123  void applyWorldNormalCalculation(const Camera &cam);
124 
126 
127  const core::DataSegment<float,4> getWorldNormals();
128 
130 
131  const core::Img8u &getRGBNormalImage();
132 
134 
136  void setNormals(core::DataSegment<float,4> pNormals);
137 
139 
141  void applyAngleImageCalculation();
142 
144 
145  const core::Img32f &getAngleImage();
146 
148 
150  void setAngleImage(const core::Img32f &angleImg);
151 
153 
154  void applyImageBinarization();
155 
157 
158  const core::Img8u &getBinarizedAngleImage();
159 
161 
163  void setMedianFilterSize(int size);
164 
166 
168  void setNormalCalculationRange(int range);
169 
171 
172  void setNormalAveragingRange(int range);
173 
175 
177  void setAngleNeighborhoodMode(int mode);
178 
180 
182  void setAngleNeighborhoodRange(int range);
183 
185 
188  void setBinarizationThreshold(float threshold);
189 
191 
193  void setUseNormalAveraging(bool use);
194 
196 
198  void setUseGaussSmoothing(bool use);
199 
200  private:
201  ObjectEdgeDetectorPlugin* objectEdgeDetector;
202 
203  void initialize(utils::Size size);
204 
205  };
206  }
207 }
Data * m_data
internal data type
Definition: ObjectEdgeDetector.h:54
undocument this line if you encounter any issues!
Definition: Any.h:37
Definition: ObjectEdgeDetector.h:52
ObjectEdgeDetectorPlugin * objectEdgeDetector
Definition: ObjectEdgeDetector.h:201
#define ICLGeom_API
Definition: CompatMacros.h:179
Camera class.
Definition: Camera.h:132
Size class of the ICL.
Definition: Size.h:61
ICLQt_API core::Img< T > filter(const core::Img< T > &image, const std::string &filter)
applies a filter operation on the source image (affinity for float)
Mode
Definition: ObjectEdgeDetector.h:59