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$
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       typedef boost::shared_ptr<BilateralUpsampling<PointInT, PointOutT> > Ptr;
00067       typedef boost::shared_ptr<const BilateralUpsampling<PointInT, PointOutT> > ConstPtr;
00068 
00069       using PCLBase<PointInT>::input_;
00070       using PCLBase<PointInT>::indices_;
00071       using PCLBase<PointInT>::initCompute;
00072       using PCLBase<PointInT>::deinitCompute;
00073       using CloudSurfaceProcessing<PointInT, PointOutT>::process;
00074 
00075       typedef pcl::PointCloud<PointOutT> PointCloudOut;
00076 
00077       Eigen::Matrix3f KinectVGAProjectionMatrix, KinectSXGAProjectionMatrix;
00078 
00080       BilateralUpsampling () 
00081         : KinectVGAProjectionMatrix ()
00082         , KinectSXGAProjectionMatrix ()
00083         , window_size_ (5)
00084         , sigma_color_ (15.0f)
00085         , sigma_depth_ (0.5f)
00086         , projection_matrix_ ()
00087         , unprojection_matrix_ ()
00088       {
00089         KinectVGAProjectionMatrix << 525.0f, 0.0f, 320.0f,
00090                                      0.0f, 525.0f, 240.0f,
00091                                      0.0f, 0.0f, 1.0f;
00092         KinectSXGAProjectionMatrix << 1050.0f, 0.0f, 640.0f,
00093                                       0.0f, 1050.0f, 480.0f,
00094                                       0.0f, 0.0f, 1.0f;
00095       };
00096 
00100       inline void
00101       setWindowSize (int window_size) { window_size_ = window_size; }
00102 
00104       inline int
00105       getWindowSize () const { return (window_size_); }
00106 
00110       inline void
00111       setSigmaColor (const float &sigma_color) { sigma_color_ = sigma_color; }
00112 
00114       inline float
00115       getSigmaColor () const { return (sigma_color_); }
00116 
00120       inline void
00121       setSigmaDepth (const float &sigma_depth) { sigma_depth_ = sigma_depth; }
00122 
00124       inline float
00125       getSigmaDepth () const { return (sigma_depth_); }
00126 
00132       inline void
00133       setProjectionMatrix (const Eigen::Matrix3f &projection_matrix) { projection_matrix_ = projection_matrix; }
00134 
00136       inline Eigen::Matrix3f
00137       getProjectionMatrix () const { return (projection_matrix_); }
00138 
00141       void
00142       process (pcl::PointCloud<PointOutT> &output);
00143 
00144     protected:
00145       void
00146       performProcessing (pcl::PointCloud<PointOutT> &output);
00147 
00148     private:
00149       int window_size_;
00150       float sigma_color_, sigma_depth_;
00151       Eigen::Matrix3f projection_matrix_, unprojection_matrix_;
00152 
00153     public:
00154       EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00155   };
00156 }
00157 
00158 #endif /* PCL_SURFACE_BILATERAL_UPSAMPLING_H_ */


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:22:36