Ask Your Question
0

Extracting narf keypoints from kinect depth image problem [closed]

asked 2012-08-07 01:58:07 -0500

David Bravo gravatar image

updated 2016-10-24 08:34:21 -0500

ngrennan gravatar image

Hi, I'm trying get NARF keypoints using depth images from a kinect with the following code but I keep getting the errors at the bottom of the post when I try to compile, the problem seems to occur when I try to publish the keypoints, I just need to publish the keypoints so I can see them in Rviz. Could anyone shed some light onto what I'm doing wrong?

typedef pcl::PointCloud<pcl::pointcloud<int> > PointCloud;

ros::Publisher pub;

pcl::PointCloud<int> keypointsout;

float angular_resolution_; float support_size_ =0.2f;

void depthimage_cb(const sensor_msgs::ImageConstPtr &depth_msg) { const uint16_t* depthImage = reinterpret_cast<const uint16_t*&gt;(&amp;depth_msg-="">data[0]);

pcl::RangeImagePlanar range_image_;
pcl::RangeImageBorderExtractor range_image_border_extractor_;

// convert the depth-image to a pcl::rangeImage
angular_resolution_ = (float)(-1);
range_image_.setDepthImage(depthImage,depth_msg->width, depth_msg->height, (depth_msg->width)/2, (depth_msg->height)/2, 600.0, 600.0, angular_resolution_);

range_image_.setUnseenToMaxRange();
pcl::NarfKeypoint keypoint_det;

keypoint_det.getParameters ().support_size =  support_size_;
keypoint_det.setRangeImageBorderExtractor (&range_image_border_extractor_);
keypoint_det.setRangeImage (&range_image_);

keypoint_det.compute (keypointsout); pub.publish (keypointsout); }

int main (int argc, char** argv) { // Initialize ROS ros::init (argc, argv, "keypointsplanar"); ros::NodeHandle nh2; //pub = nh2.advertise< PointCloud > ("keypointsout", 1);

ros::Subscriber sub2 = nh1.subscribe ("/camera/depth/image", 1, depthimage_cb);

pub = nh2.advertise<pcl::pointcloud<int> keypointsout> ("keypointsout", 1);

// Spin ros::spin (); }

ERRORS:

from /home/jumpei/fuerte_workspace/tesis/src/keypointsplanar.cpp:1: /opt/ros/fuerte/include/ros/message_traits.h: In static member function ‘static const char* ros::message_traits::MD5Sum<m>::value(const M&) [with M = pcl::PointCloud<int>]’: /opt/ros/fuerte/include/ros/message_traits.h:255:104: instantiated from ‘const char* ros::message_traits::md5sum(const M&) [with M = pcl::PointCloud<int>]’ /opt/ros/fuerte/include/ros/publisher.h:112:7: instantiated from ‘void ros::Publisher::publish(const M&) const [with M = pcl::PointCloud<int>]’ /home/jumpei/fuerte_workspace/tesis/src/keypointsplanar.cpp:49:30: instantiated from here /opt/ros/fuerte/include/ros/message_traits.h:126:34: error: ‘const class pcl::PointCloud<int>’ has no member named ‘__getMD5Sum’ /opt/ros/fuerte/include/ros/message_traits.h: In static member function ‘static const char* ros::message_traits::DataType<m>::value(const M&) [with M = pcl::PointCloud<int>]’: /opt/ros/fuerte/include/ros/message_traits.h:264:106: instantiated from ‘const char* ros::message_traits::datatype(const M&) [with M = pcl::PointCloud<int>]’ /opt/ros/fuerte/include/ros/publisher.h:112:7: instantiated from ‘void ros::Publisher::publish(const M&) const [with M = pcl::PointCloud<int>]’ /home/jumpei/fuerte_workspace/tesis/src/keypointsplanar.cpp:49:30: instantiated from here /opt/ros/fuerte/include/ros/message_traits.h:143:36: error: ‘const class pcl::PointCloud<int>’ has no member named ‘__getDataType’ In file included from /opt/ros/fuerte/include/ros/publisher.h:34:0, from /opt/ros/fuerte/include/ros/node_handle.h:32, from /opt/ros/fuerte/include/ros/ros.h:45, from /home/jumpei/fuerte_workspace/tesis/src/keypointsplanar.cpp:1: /opt/ros/fuerte/include/ros/serialization.h: In static member function ‘static uint32_t ros::serialization::Serializer<t>::serializedLength(typename boost::call_traits<t>::param_type) [with T = pcl::PointCloud<int>, uint32_t = unsigned int, typename boost::call_traits<t ... (more)

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-12-29 14:34:05

1 Answer

Sort by » oldest newest most voted
-2

answered 2013-01-26 06:08:16 -0500

updated 2013-01-26 06:08:54 -0500

You might want to try the SURE 3D features:

code.google.com/p/sure-3d-features

See these papers for details:

  • SURE: Surface Entropy for Distinctive 3D Features: www.ais.uni-bonn.de/papers/Spatial_Cognition_2012_SURE.pdf

  • Place Recognition using Surface Entropy Features: www.ais.uni-bonn.de/papers/ICRA_WS_SPME_2012_Fiolka_et_al.pdf

edit flag offensive delete link more

Comments

@Sven Behnke This is not relevant to the compile problems the poster has raised.

tfoote gravatar image tfoote  ( 2013-03-02 21:47:38 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2012-08-07 01:58:07 -0500

Seen: 790 times

Last updated: Jan 26 '13