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.GPL  **
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 <ICLGeom/GeomDefs.h>
00034 #include <ICLCore/Img.h>
00035 #include <ICLGeom/Camera.h>
00036 #include <ICLUtils/Uncopyable.h>
00037 
00038 namespace icl{
00039   namespace geom{
00071     class PointCloudNormalEstimator : public utils::Uncopyable{
00072       struct Data;  
00073       Data *m_data; 
00074 
00075      public:
00076   
00077         
00079 
00082       PointCloudNormalEstimator(utils::Size size); 
00083         
00085       virtual ~PointCloudNormalEstimator();
00086   
00088 
00094       const core::Img8u &calculate(const core::Img32f &depthImage, bool filter, bool average, bool gauss);
00095         
00097 
00098       void setDepthImage(const core::Img32f &depthImg);
00099         
00101 
00102       void applyMedianFilter();
00103         
00105 
00106       const core::Img32f &getFilteredDepthImage();
00107         
00109 
00111       void setFilteredDepthImage(const core::Img32f &filteredImg); 
00112         
00114 
00116       void applyNormalCalculation();
00117         
00119 
00123       void applyTemporalNormalAveraging();
00124   
00126 
00132       void applyGaussianNormalSmoothing();
00133   
00135 
00136       const Vec* getNormals();
00137       
00139 
00140       void applyWorldNormalCalculation(const Camera &cam);
00141           
00143 
00144       const Vec* getWorldNormals();
00145           
00147 
00148       const core::Img8u &getRGBNormalImage();
00149       
00151 
00153       void setNormals(Vec* pNormals);
00154         
00156 
00158       void applyAngleImageCalculation();
00159         
00161 
00162       const core::Img32f &getAngleImage();
00163         
00165 
00167       void setAngleImage(const core::Img32f &angleImg);
00168         
00170 
00171       void applyImageBinarization();
00172         
00174 
00175       const core::Img8u &getBinarizedAngleImage();      
00176         
00178 
00180       void setMedianFilterSize(int size);
00181         
00183 
00185       void setNormalCalculationRange(int range);
00186         
00188 
00189       void setNormalAveragingRange(int range);
00190         
00192 
00194       void setAngleNeighborhoodMode(int mode);
00195         
00197 
00199       void setAngleNeighborhoodRange(int range);
00200         
00202 
00205       void setBinarizationThreshold(float threshold);
00206         
00208 
00210       void setUseCL(bool use);
00211         
00213 
00215       void setUseNormalAveraging(bool use);
00216       
00218 
00220       void setUseGaussSmoothing(bool use);
00221         
00223 
00225       bool isCLReady();
00226         
00228 
00230       bool isCLActive();
00231     };
00232   } // namespace geom
00233 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines