Image Component Library (ICL)
PointCloudCreatorCL.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/PointCloudCreatorCL.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 <ICLUtils/CompatMacros.h>
35 #include <ICLCore/Img.h>
36 #include <ICLMath/FixedVector.h>
37 
38 #ifdef ICL_HAVE_OPENCL
39 #include <ICLUtils/CLProgram.h>
40 #include <ICLUtils/CLKernel.h>
41 #include <ICLUtils/CLBuffer.h>
42 #endif
43 
44 namespace icl{
45  namespace geom{
49 
50  public:
52 
56 
59 
61 
63 
65  ICLGeom_API void create(bool NEEDS_RAW_TO_MM_MAPPING,const core::Img32f *depthValues,
66  const Vec O, const int DEPTH_DIM,
67  core::DataSegment<float,3> xyz, const utils::Array2D<Vec> &dirs, float depthScaling);
68 
70  ICLGeom_API void createRGB(bool NEEDS_RAW_TO_MM_MAPPING, const core::Img32f *depthValues, const Mat M,
71  const Vec O, const unsigned int COLOR_W, const unsigned int COLOR_H, const int DEPTH_DIM,
73  const core::Img8u *rgbIn,const utils::Array2D<Vec> &dirs, float depthScaling);
74 
76 
77  ICLGeom_API bool isCLReady();
78 
79  private:
80  bool clReady;
82  #ifdef ICL_HAVE_OPENCL
83  //OpenCL data
84 
85  //float* depthValuesArray;
86  // unsigned char* rInArray;
87  //unsigned char* gInArray;
88  //unsigned char* bInArray;
89  float* xyzData;
91 
92  //OpenCL
94 
97 
106 
107  #endif
108  };
109  } // namespace geom
110 }
utils::CLBuffer rgbaBuffer
Definition: PointCloudCreatorCL.h:101
undocument this line if you encounter any issues!
Definition: Any.h:37
utils::CLProgram program
Definition: PointCloudCreatorCL.h:93
utils::CLBuffer rInBuffer
Definition: PointCloudCreatorCL.h:102
ICLGeom_API bool isCLReady()
Returns the openCL status (true=openCL context ready, false=no openCL context available)
utils::CLBuffer matrixBuffer
Definition: PointCloudCreatorCL.h:99
#define ICLGeom_API
Definition: CompatMacros.h:179
Wrapper for an OpenCL Kernel.
Definition: CLKernel.h:72
utils::CLBuffer gInBuffer
Definition: PointCloudCreatorCL.h:103
Definition: PointCloudCreatorCL.h:48
ICLGeom_API ~PointCloudCreatorCL()
Destructor.
bool clReady
Definition: PointCloudCreatorCL.h:80
utils::CLKernel kernelCreateRGB
Definition: PointCloudCreatorCL.h:96
float * xyzData
Definition: PointCloudCreatorCL.h:89
Wrapper for an OpenCL Buffer.
Definition: CLBuffer.h:52
math::FixedColVector< float, 4 > * rgbaData
Definition: PointCloudCreatorCL.h:90
Size class of the ICL.
Definition: Size.h:61
utils::CLBuffer bInBuffer
Definition: PointCloudCreatorCL.h:104
Simple 2D-Array class that provides shallow copy per default.
Definition: Array2D.h:61
ICLGeom_API PointCloudCreatorCL(utils::Size size, const utils::Array2D< Vec > &dirs)
Constructor.
ICLGeom_API void create(bool NEEDS_RAW_TO_MM_MAPPING, const core::Img32f *depthValues, const Vec O, const int DEPTH_DIM, core::DataSegment< float, 3 > xyz, const utils::Array2D< Vec > &dirs, float depthScaling)
Creates a uncolored pointcloud (called from PointCloudCreator)
ICLGeom_API void createRGB(bool NEEDS_RAW_TO_MM_MAPPING, const core::Img32f *depthValues, const Mat M, const Vec O, const unsigned int COLOR_W, const unsigned int COLOR_H, const int DEPTH_DIM, core::DataSegment< float, 3 > xyz, core::DataSegment< float, 4 > rgba, const core::Img8u *rgbIn, const utils::Array2D< Vec > &dirs, float depthScaling)
Creates a RGBD-mapped pointcloud (called from PointCloudCreator)
utils::CLKernel kernelCreate
Definition: PointCloudCreatorCL.h:95
utils::CLBuffer dirsBuffer
Definition: PointCloudCreatorCL.h:105
utils::CLBuffer xyzBuffer
Definition: PointCloudCreatorCL.h:100
utils::Size size
Definition: PointCloudCreatorCL.h:81
utils::CLBuffer depthValuesBuffer
Definition: PointCloudCreatorCL.h:98
The DataSegment class defines a strided data segment (or 1D or 2D ordred array of vectors)
Definition: DataSegment.h:147
ICLGeom_API void setDirectionVectors(const utils::Array2D< Vec > &dirs)
updates the internally used direction vectors
Main class for OpenCL based accelleration.
Definition: CLProgram.h:259