00001 00059 /* 00060 * registration_ipc_moments.h 00061 * 00062 * Created on: Nov 14, 2011 00063 * Author: goa-jh 00064 */ 00065 00066 #ifndef REGISTRATION_IPC_MOMENTS_H_ 00067 #define REGISTRATION_IPC_MOMENTS_H_ 00068 00069 #include "registration_icp.h" 00070 #include "features/moments.h" 00071 00072 namespace cob_3d_registration { 00073 00074 template <typename Point> 00075 class Registration_ICP_Moments : public Registration_ICP_Features<Point> 00076 { 00077 Feature_MomentInvariants<Point> *mom_; 00078 00079 public: 00080 Registration_ICP_Moments(): 00081 mom_(new Feature_MomentInvariants<Point>) 00082 { 00083 this->setCorrDist(0.1); 00084 this->setFeatures(mom_); 00085 } 00086 00087 virtual ~Registration_ICP_Moments() { 00088 delete mom_; 00089 } 00090 00091 void setMomentRadius(float v) {mom_->setMomentRadius(v);} 00092 00093 protected: 00094 virtual bool compute_features() { 00095 //transform pc first 00096 if(!this->Registration_ICP_Features<Point>::compute_features()) 00097 return false; 00098 00099 mom_->setSearchRadius(this->icp_max_corr_dist_); 00100 if(this->register_.size()>0) 00101 mom_->build(this->register_, *this->input_); 00102 00103 return true; 00104 } 00105 }; 00106 00107 } 00108 00109 #endif /* REGISTRATION_IPC_MOMENTS_H_ */