bilateral_upsampling.h
Go to the documentation of this file.
00001 /*
00002  * Software License Agreement (BSD License)
00003  *
00004  * Point Cloud Library (PCL) - www.pointclouds.org
00005  * Copyright (c) 2009-2012, Willow Garage, Inc.
00006  *
00007  * All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions
00011  * are met:
00012  *
00013  * * Redistributions of source code must retain the above copyright
00014  * notice, this list of conditions and the following disclaimer.
00015  * * Redistributions in binary form must reproduce the above
00016  *   copyright notice, this list of conditions and the following
00017  *   disclaimer in the documentation and/or other materials provided
00018  *   with the distribution.
00019  * * Neither the name of Willow Garage, Inc. nor the names of its
00020  *   contributors may be used to endorse or promote products derived
00021  *   from this software without specific prior written permission.
00022  *
00023  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00024  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00025  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00026  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00027  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00028  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00029  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00030  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00031  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00032  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00033  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00034  * POSSIBILITY OF SUCH DAMAGE.
00035  *
00036  * $Id: bilateral_upsampling.h 5462 2012-04-01 16:11:40Z aichim $
00037  *
00038  */
00039 
00040 
00041 #ifndef PCL_SURFACE_BILATERAL_UPSAMPLING_H_
00042 #define PCL_SURFACE_BILATERAL_UPSAMPLING_H_
00043 
00044 #include <pcl/surface/processing.h>
00045 
00046 namespace pcl
00047 {
00048 
00062   template <typename PointInT, typename PointOutT>
00063   class BilateralUpsampling: public CloudSurfaceProcessing<PointInT, PointOutT>
00064   {
00065     public:
00066       using PCLBase<PointInT>::input_;
00067       using PCLBase<PointInT>::indices_;
00068       using PCLBase<PointInT>::initCompute;
00069       using PCLBase<PointInT>::deinitCompute;
00070       using CloudSurfaceProcessing<PointInT, PointOutT>::process;
00071 
00072       typedef pcl::PointCloud<PointOutT> PointCloudOut;
00073 
00074       Eigen::Matrix3f KinectVGAProjectionMatrix, KinectSXGAProjectionMatrix;
00075 
00077       BilateralUpsampling () 
00078         : KinectVGAProjectionMatrix ()
00079         , KinectSXGAProjectionMatrix ()
00080         , window_size_ (5)
00081         , sigma_color_ (15.0f)
00082         , sigma_depth_ (0.5f)
00083         , projection_matrix_ ()
00084         , unprojection_matrix_ ()
00085       {
00086         KinectVGAProjectionMatrix << 525.0f, 0.0f, 320.0f,
00087                                      0.0f, 525.0f, 240.0f,
00088                                      0.0f, 0.0f, 1.0f;
00089         KinectSXGAProjectionMatrix << 1050.0f, 0.0f, 640.0f,
00090                                       0.0f, 1050.0f, 480.0f,
00091                                       0.0f, 0.0f, 1.0f;
00092       };
00093 
00097       inline void
00098       setWindowSize (int window_size) { window_size_ = window_size; }
00099 
00101       inline int
00102       getWindowSize () const { return (window_size_); }
00103 
00107       inline void
00108       setSigmaColor (const float &sigma_color) { sigma_color_ = sigma_color; }
00109 
00111       inline float
00112       getSigmaColor () const { return (sigma_color_); }
00113 
00117       inline void
00118       setSigmaDepth (const float &sigma_depth) { sigma_depth_ = sigma_depth; }
00119 
00121       inline float
00122       getSigmaDepth () const { return (sigma_depth_); }
00123 
00129       inline void
00130       setProjectionMatrix (const Eigen::Matrix3f &projection_matrix) { projection_matrix_ = projection_matrix; }
00131 
00133       inline Eigen::Matrix3f
00134       getProjectionMatrix () const { return (projection_matrix_); }
00135 
00138       void
00139       process (pcl::PointCloud<PointOutT> &output);
00140 
00141     protected:
00142       void
00143       performProcessing (pcl::PointCloud<PointOutT> &output);
00144 
00145     private:
00146       int window_size_;
00147       float sigma_color_, sigma_depth_;
00148       Eigen::Matrix3f projection_matrix_, unprojection_matrix_;
00149 
00150     public:
00151       EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00152   };
00153 }
00154 
00155 #endif /* PCL_SURFACE_BILATERAL_UPSAMPLING_H_ */


pcl
Author(s): Open Perception
autogenerated on Mon Oct 6 2014 03:14:40