Image Component Library (ICL)
CoPlanarityFeatureExtractor.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/CoPlanarityFeatureExtractor.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 
57  static math::DynMatrix<bool> apply(math::DynMatrix<bool> &initialMatrix, std::vector<SurfaceFeatureExtractor::SurfaceFeature> features,
58  const core::Img32f &depthImage, std::vector<std::vector<int> > &surfaces, float maxAngle=30,
59  float distanceTolerance=3, float outlierTolerance=5, int triangles=50, int scanlines=9);
60 
61  private:
62 
63  static float getAngle(Vec n1, Vec n2);
64  static utils::Point getRandomPoint(std::vector<int> surface, int imgWidth);
65  static Vec getNormal(Vec p1, Vec p2, Vec p3);
66  static bool criterion1(Vec n1, Vec n2, float maxAngle);
67  static bool criterion2(const core::Img32f &depthImage, std::vector<int> &surface1, std::vector<int> &surface2,
68  Vec n1, Vec n2, float maxAngle, int triangles);
69  static bool criterion3(const core::Img32f &depthImage, std::vector<int> &surface1, std::vector<int> &surface2,
70  float distanceTolerance, float outlierTolerance, int scanlines);
71  };
72 
73  } // namespace geom
74 }
static math::DynMatrix< bool > apply(math::DynMatrix< bool > &initialMatrix, std::vector< SurfaceFeatureExtractor::SurfaceFeature > features, const core::Img32f &depthImage, std::vector< std::vector< int > > &surfaces, float maxAngle=30, float distanceTolerance=3, float outlierTolerance=5, int triangles=50, int scanlines=9)
Calculates the coplanarity feature matrix.
undocument this line if you encounter any issues!
Definition: Any.h:37
static bool criterion1(Vec n1, Vec n2, float maxAngle)
static bool criterion3(const core::Img32f &depthImage, std::vector< int > &surface1, std::vector< int > &surface2, float distanceTolerance, float outlierTolerance, int scanlines)
class for coplanarity feature.
Definition: CoPlanarityFeatureExtractor.h:42
static Vec getNormal(Vec p1, Vec p2, Vec p3)
static bool criterion2(const core::Img32f &depthImage, std::vector< int > &surface1, std::vector< int > &surface2, Vec n1, Vec n2, float maxAngle, int triangles)
static float getAngle(Vec n1, Vec n2)
static utils::Point getRandomPoint(std::vector< int > surface, int imgWidth)
Point class of the ICL used e.g. for the Images ROI offset.
Definition: Point.h:58