Image Component Library (ICL)
|
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/PointCloudCreator.h ** 00010 ** Module : ICLGeom ** 00011 ** Authors: Christof Elbrechter, Patrick Nobou ** 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/PointCloudObjectBase.h> 00035 #include <ICLGeom/Camera.h> 00036 #include <ICLGeom/RGBDMapping.h> 00037 00038 namespace icl{ 00039 namespace geom{ 00040 00042 00056 class ICLGeom_API PointCloudCreator{ 00057 struct Data; // !< pimpl type 00058 Data *m_data; // !< pimpl pointer 00059 public: 00060 00062 00065 enum DepthImageMode{ 00066 DistanceToCamCenter, 00067 DistanceToCamPlane, 00068 KinectRAW11Bit 00069 }; 00070 00072 PointCloudCreator(); 00073 00075 PointCloudCreator(const Camera &depthCam, DepthImageMode mode=DistanceToCamPlane); 00076 00078 PointCloudCreator(const Camera &depthCam, const Camera &colorCam, DepthImageMode mode=DistanceToCamPlane); 00079 00081 PointCloudCreator(const PointCloudCreator &other); 00082 00084 PointCloudCreator &operator=(const PointCloudCreator &other); 00085 00086 00088 ~PointCloudCreator(); 00089 00091 void init(const Camera &depthCam, DepthImageMode mode=DistanceToCamPlane); 00092 00094 void init(const Camera &depthCam, const Camera &colorCam, DepthImageMode mode=DistanceToCamPlane); 00095 00097 00100 void create(const core::Img32f &depthImage, PointCloudObjectBase &destination, const core::Img8u *rgbImage = 0, float depthScaling=1); 00101 00103 const Camera &getDepthCamera() const; 00104 00106 const Camera &getColorCamera() const throw (utils::ICLException); 00107 00109 00111 void setCameras(const Camera &depthCam, const Camera &colorCam); 00112 00114 00117 void setDepthCamera(const Camera &depthCam); 00118 00120 bool hasColorCamera() const; 00121 00123 00127 void mapImage(const core::ImgBase *src, core::ImgBase **dst, const core::Img32f *depthImageMM=0); 00128 00130 00131 void setUseCL(bool use); 00132 00134 00137 RGBDMapping getMapping() const throw (utils::ICLException); 00138 00140 00145 void setFixes(float focalLengthMultiplier=1, float positionOffsetAlongNorm=0); 00146 }; 00147 00148 } // namespace geom 00149 } 00150