pcl_features.h
Go to the documentation of this file.
00001 #ifndef PCL_FEATURES_H
00002 #define PCL_FEATURES_H
00003 #include <pcl/kdtree/kdtree_flann.h>
00004 #include <pcl/surface/mls.h>
00005 #include <pcl/features/fpfh.h>
00006 #include <pcl/registration/ia_ransac.h>
00007 #include <pcl/registration/icp_nl.h>
00008 #include <pcl/point_representation.h>
00009 #include <pcl/filters/voxel_grid.h>
00010 #include <hrl_phri_2011/pcl_basic.h>
00011 #include <hrl_phri_2011/hsl_rgb_conversions.h>
00012 
00013 typedef pcl::KdTree<PRGB> KDTree;
00014 typedef pcl::PointCloud<pcl::Normal> PCNormals;
00015 typedef pcl::PointCloud<pcl::FPFHSignature33> FPFeatures;
00016 
00017 void computeNormals(const PCRGB::Ptr& in_pc, const KDTree::Ptr& in_kd_tree, PCNormals::Ptr& out_normals);
00018 void computeFPFH(const PCRGB::Ptr& in_pc, FPFeatures::Ptr& out_features);
00019 void computeSACRegistration(const PCRGB::Ptr& target_pc, const PCRGB::Ptr& source_pc);
00020 void computeICPRegistration(const PCRGB::Ptr& target_pc, const PCRGB::Ptr& source_pc,
00021                             Eigen::Affine3d& tf_mat, int max_iters=300, double color_weight=0.0005);
00022 
00023 namespace pcl {
00024 
00025 template <>
00026 class DefaultPointRepresentation<PRGB> : public PointRepresentation<PRGB> {
00027 public:
00028     DefaultPointRepresentation(float h_mult = 0.0005, float s_mult = 0.0005, float l_mult = 0.0005) {
00029         nr_dimensions_ = 6;
00030         alpha_.resize(6);
00031         alpha_[0] = 1; alpha_[1] = 1; alpha_[2] = 1;
00032         alpha_[3] = h_mult; alpha_[4] = s_mult; alpha_[5] = l_mult;
00033     }
00034     virtual void copyToFloatArray(const PRGB& p, float* out) const {
00035         double h, s, l;
00036         extractHSL(p.rgb, h, s, l);
00037         out[0] = p.x; out[1] = p.y; out[2] = p.z;
00038         out[3] = h; out[4] = s; out[5] = l;
00039     }
00040     /*bool isValid<PRGB>(const PRGB& p) const {
00041         if(p.x == p.x && p.y == p.y && p.z == p.z)
00042             return true;
00043         else
00044             return false;
00045     }*/
00046 };
00047 }
00048 
00049 #endif // PCL_FEATURES_H


hrl_phri_2011
Author(s): Kelsey Hawkins
autogenerated on Wed Nov 27 2013 12:22:40