Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
PointCloudNormalEstimator.h
Go to the documentation of this file.
00001 /********************************************************************
00002 **                Image Component Library (ICL)                    **
00003 **                                                                 **
00004 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld          **
00005 **                         Neuroinformatics Group                  **
00006 ** Website: www.iclcv.org and                                      **
00007 **          http://opensource.cit-ec.de/projects/icl               **
00008 **                                                                 **
00009 ** File   : ICLGeom/src/ICLGeom/PointCloudNormalEstimator.h        **
00010 ** Module : ICLGeom                                                **
00011 ** Authors: Andre Ueckermann                                       **
00012 **                                                                 **
00013 **                                                                 **
00014 ** GNU LESSER GENERAL PUBLIC LICENSE                               **
00015 ** This file may be used under the terms of the GNU Lesser General **
00016 ** Public License version 3.0 as published by the                  **
00017 **                                                                 **
00018 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
00019 ** included in the packaging of this file.  Please review the      **
00020 ** following information to ensure the license requirements will   **
00021 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt                **
00022 **                                                                 **
00023 ** The development of this software was supported by the           **
00024 ** Excellence Cluster EXC 277 Cognitive Interaction Technology.    **
00025 ** The Excellence Cluster EXC 277 is a grant of the Deutsche       **
00026 ** Forschungsgemeinschaft (DFG) in the context of the German       **
00027 ** Excellence Initiative.                                          **
00028 **                                                                 **
00029 ********************************************************************/
00030 
00031 #pragma once
00032 
00033 #include <ICLUtils/CompatMacros.h>
00034 #include <ICLGeom/GeomDefs.h>
00035 #include <ICLCore/Img.h>
00036 #include <ICLGeom/Camera.h>
00037 #include <ICLUtils/Uncopyable.h>
00038 
00039 namespace icl{
00040   namespace geom{
00072     class ICLGeom_API PointCloudNormalEstimator : public utils::Uncopyable{
00073       struct Data;  
00074       Data *m_data; 
00075 
00076      public:
00077   
00078         
00080 
00083       PointCloudNormalEstimator(utils::Size size); 
00084         
00086       virtual ~PointCloudNormalEstimator();
00087   
00089 
00095       const core::Img8u &calculate(const core::Img32f &depthImage, bool filter, bool average, bool gauss);
00096         
00098 
00099       void setDepthImage(const core::Img32f &depthImg);
00100         
00102 
00103       void applyMedianFilter();
00104         
00106 
00107       const core::Img32f &getFilteredDepthImage();
00108         
00110 
00112       void setFilteredDepthImage(const core::Img32f &filteredImg); 
00113         
00115 
00117       void applyNormalCalculation();
00118         
00120 
00124       void applyTemporalNormalAveraging();
00125   
00127 
00133       void applyGaussianNormalSmoothing();
00134   
00136 
00137       const Vec* getNormals();
00138       
00140 
00141       void applyWorldNormalCalculation(const Camera &cam);
00142           
00144 
00145       const Vec* getWorldNormals();
00146           
00148 
00149       const core::Img8u &getRGBNormalImage();
00150       
00152 
00154       void setNormals(Vec* pNormals);
00155         
00157 
00159       void applyAngleImageCalculation();
00160         
00162 
00163       const core::Img32f &getAngleImage();
00164         
00166 
00168       void setAngleImage(const core::Img32f &angleImg);
00169         
00171 
00172       void applyImageBinarization();
00173         
00175 
00176       const core::Img8u &getBinarizedAngleImage();      
00177         
00179 
00181       void setMedianFilterSize(int size);
00182         
00184 
00186       void setNormalCalculationRange(int range);
00187         
00189 
00190       void setNormalAveragingRange(int range);
00191         
00193 
00195       void setAngleNeighborhoodMode(int mode);
00196         
00198 
00200       void setAngleNeighborhoodRange(int range);
00201         
00203 
00206       void setBinarizationThreshold(float threshold);
00207         
00209 
00211       void setUseCL(bool use);
00212         
00214 
00216       void setUseNormalAveraging(bool use);
00217       
00219 
00221       void setUseGaussSmoothing(bool use);
00222         
00224 
00226       bool isCLReady();
00227         
00229 
00231       bool isCLActive();
00232     };
00233   } // namespace geom
00234 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines