Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
ObjectEdgeDetectorGPU.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/ObjectEdgeDetectorGPU.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 
00032 //Please use the ObjectEdgeDetector Class.
00033 //This is the GPU implementation of the interface.
00034 
00035 #pragma once
00036 
00037 #include <ICLGeom/ObjectEdgeDetectorPlugin.h>
00038 
00039 namespace icl{
00040   namespace geom{
00041     class ICLGeom_API ObjectEdgeDetectorGPU : public ObjectEdgeDetectorPlugin{
00042     
00043      struct Data;  
00044       Data *m_data; 
00045 
00046      public:
00047   
00049 
00051       ObjectEdgeDetectorGPU(); 
00052         
00054       virtual ~ObjectEdgeDetectorGPU();
00055     
00057 
00063       const core::Img8u &calculate(const core::Img32f &depthImage, bool filter, bool average, bool gauss);
00064         
00066 
00067       void setDepthImage(const core::Img32f &depthImg);
00068         
00070 
00071       void applyMedianFilter();
00072         
00074 
00075       const core::Img32f &getFilteredDepthImage();
00076         
00078 
00080       void setFilteredDepthImage(const core::Img32f &filteredImg); 
00081         
00083 
00085       void applyNormalCalculation();
00086         
00088 
00092       void applyLinearNormalAveraging();
00093   
00095 
00101       void applyGaussianNormalSmoothing();
00102   
00104 
00105       const core::DataSegment<float,4> getNormals();
00106       
00108 
00109       void applyWorldNormalCalculation(const Camera &cam);
00110           
00112 
00113       const core::DataSegment<float,4> getWorldNormals();
00114           
00116 
00117       const core::Img8u &getRGBNormalImage();
00118       
00120 
00122       void setNormals(core::DataSegment<float,4> pNormals);
00123         
00125 
00127       void applyAngleImageCalculation();
00128         
00130 
00131       const core::Img32f &getAngleImage();
00132         
00134 
00136       void setAngleImage(const core::Img32f &angleImg);
00137         
00139 
00140       void applyImageBinarization();
00141         
00143 
00144       const core::Img8u &getBinarizedAngleImage();      
00145         
00147 
00149       void setMedianFilterSize(int size);
00150         
00152 
00154       void setNormalCalculationRange(int range);
00155         
00157 
00158       void setNormalAveragingRange(int range);
00159         
00161 
00163       void setAngleNeighborhoodMode(int mode);
00164         
00166 
00168       void setAngleNeighborhoodRange(int range);
00169         
00171 
00174       void setBinarizationThreshold(float threshold);
00175         
00177 
00179       void setUseNormalAveraging(bool use);
00180       
00182 
00184       void setUseGaussSmoothing(bool use);
00185         
00187 
00189       bool isCLReady();  
00190       
00191       void initialize(utils::Size size);
00192         
00193     };
00194   }
00195 }
00196 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines