Image Component Library (ICL)
CurvatureFeatureExtractor.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/CurvatureFeatureExtractor.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 <ICLMath/DynMatrix.h>
35 
36 namespace icl{
37  namespace geom{
38 
40 
43 
44  public:
45 
47 
63  std::vector<SurfaceFeatureExtractor::SurfaceFeature> features,
64  std::vector<std::vector<int> > &surfaces, core::DataSegment<float,4> &normals, bool useOpenObjects=true, bool useOccludedObjects=true,
65  float histogramSimilarity=0.5, int distance=10, float maxError=10., int ransacPasses=20, float distanceTolerance=3., float outlierTolerance=5.);
66 
67  private:
68 
70  std::vector<int> &surface1, std::vector<int> &surface2, int distance, int w);
71 
74  std::vector<int> &surface1, std::vector<int> &surface2, int w, float maxError, int ransacPasses, float distanceTolerance, float outlierTolerance);
75 
76  static float computeConvexity(core::DataSegment<float, 4> &normals, SurfaceFeatureExtractor::SurfaceFeature feature, std::vector<int> &surface, int w);
77 
78  static std::pair<utils::Point,utils::Point> computeExtremalBins(SurfaceFeatureExtractor::SurfaceFeature feature);
79 
80  static std::pair<utils::Point,utils::Point> backproject(core::DataSegment<float, 4> &normals,
81  std::pair<utils::Point,utils::Point> &histo1ExtremalBins, std::vector<int> &surface1, int w);
82 
83  static std::vector<int> backprojectPointIDs(core::DataSegment<float,4> &normals, utils::Point bin, std::vector<int> &surface);
84 
85  static utils::Point computeMean(std::vector<int> &imgIDs, int w);
86 
87  static std::vector<utils::Point> createPointsFromIDs(std::vector<int> &imgIDs, int w);
88 
89  static std::vector<Vec> createPointsFromIDs(core::DataSegment<float,4> &xyz, std::vector<int> &imgIDs);
90 
91  static float computeConvexity(std::pair<utils::Point,utils::Point> histoExtremalBins, std::pair<utils::Point,utils::Point> imgBackproject);
92 
93  static float linePointDistance(std::pair<Vec,Vec> line, Vec point);
94 
95  static utils::Point idToPoint(int id, int w);
96 
97  };
98 
99  } // namespace geom
100 }
undocument this line if you encounter any issues!
Definition: Any.h:37
static utils::Point computeMean(std::vector< int > &imgIDs, int w)
static std::vector< int > backprojectPointIDs(core::DataSegment< float, 4 > &normals, utils::Point bin, std::vector< int > &surface)
static math::DynMatrix< bool > apply(const core::Img32f &depthImg, core::DataSegment< float, 4 > &xyz, math::DynMatrix< bool > &initialMatrix, std::vector< SurfaceFeatureExtractor::SurfaceFeature > features, std::vector< std::vector< int > > &surfaces, core::DataSegment< float, 4 > &normals, bool useOpenObjects=true, bool useOccludedObjects=true, float histogramSimilarity=0.5, int distance=10, float maxError=10., int ransacPasses=20, float distanceTolerance=3., float outlierTolerance=5.)
Calculates the curvature feature matrix.
static std::pair< utils::Point, utils::Point > computeExtremalBins(SurfaceFeatureExtractor::SurfaceFeature feature)
ICLQt_API void line(ImgQ &image, int x1, int y1, int x2, int y2)
draws a line into an image
Definition: SurfaceFeatureExtractor.h:57
static float linePointDistance(std::pair< Vec, Vec > line, Vec point)
static bool computeOpenObject(core::DataSegment< float, 4 > &normals, SurfaceFeatureExtractor::SurfaceFeature feature1, SurfaceFeatureExtractor::SurfaceFeature feature2, std::vector< int > &surface1, std::vector< int > &surface2, int distance, int w)
static std::vector< utils::Point > createPointsFromIDs(std::vector< int > &imgIDs, int w)
static std::pair< utils::Point, utils::Point > backproject(core::DataSegment< float, 4 > &normals, std::pair< utils::Point, utils::Point > &histo1ExtremalBins, std::vector< int > &surface1, int w)
Point class of the ICL used e.g. for the Images ROI offset.
Definition: Point.h:58
static float computeConvexity(core::DataSegment< float, 4 > &normals, SurfaceFeatureExtractor::SurfaceFeature feature, std::vector< int > &surface, int w)
static utils::Point idToPoint(int id, int w)
class for curvature feature (open and occluded objects).
Definition: CurvatureFeatureExtractor.h:42
static bool computeOccludedObject(const core::Img32f &depthImg, core::DataSegment< float, 4 > &xyz, core::DataSegment< float, 4 > &normals, SurfaceFeatureExtractor::SurfaceFeature feature1, SurfaceFeatureExtractor::SurfaceFeature feature2, std::vector< int > &surface1, std::vector< int > &surface2, int w, float maxError, int ransacPasses, float distanceTolerance, float outlierTolerance)