#include <openni_listener.h>
Public Member Functions | |
| void | cameraCallback (const s::ImageConstPtr &visual_img, const s::ImageConstPtr &depth_img, const s::CameraInfoConstPtr &cam_info, const s::PointCloud2ConstPtr &point_cloud) |
| OpenNIListener (ros::NodeHandle nh, const char *visual_topic="/visual_in", const char *depth_topic="/depth_in", const char *info_topic="/cam_info_in", const char *cloud_topic="/cloud_in", const char *filename="test.bag", unsigned int step=10) | |
Protected Attributes | |
| rosbag::Bag | bag_ |
| unsigned int | callback_counter_ |
| m::Subscriber< s::PointCloud2 > | cloud_sub_ |
| m::Subscriber< s::Image > | depth_sub_ |
| m::Subscriber< s::CameraInfo > | info_sub_ |
| ros::Publisher | pub_cloud_ |
| ros::Publisher | pub_ref_cloud_ |
| ros::Publisher | pub_transf_cloud_ |
| unsigned int | step_ |
| m::Synchronizer< MySyncPolicy > | sync_ |
| m::Subscriber< s::Image > | visual_sub_ |
Definition at line 31 of file openni_listener.h.
| OpenNIListener::OpenNIListener | ( | ros::NodeHandle | nh, |
| const char * | visual_topic = "/visual_in", |
||
| const char * | depth_topic = "/depth_in", |
||
| const char * | info_topic = "/cam_info_in", |
||
| const char * | cloud_topic = "/cloud_in", |
||
| const char * | filename = "test.bag", |
||
| unsigned int | step = 10 |
||
| ) |
Constructor: The listener needs to know the topic for the optical and depth image Valid detector types: FAST, STAR, SIFT, SURF, MSER, GFTT Valid extractor types: SIFT, SURF As a detector SURF is better, FAST is faster, GFTT is fast but really bad in combination the SURF Extractor
| void OpenNIListener::cameraCallback | ( | const s::ImageConstPtr & | visual_img, |
| const s::ImageConstPtr & | depth_img, | ||
| const s::CameraInfoConstPtr & | cam_info, | ||
| const s::PointCloud2ConstPtr & | point_cloud | ||
| ) |
For each synchronized pair of opitcal/depth image messages convert them to cv::Mat, rescale the depth range, convert to QImage and emit newDepthImage and newGrayImage
rosbag::Bag OpenNIListener::bag_ [protected] |
Definition at line 73 of file openni_listener.h.
unsigned int OpenNIListener::callback_counter_ [protected] |
Definition at line 69 of file openni_listener.h.
m::Subscriber<s::PointCloud2> OpenNIListener::cloud_sub_ [protected] |
Definition at line 61 of file openni_listener.h.
m::Subscriber<s::Image> OpenNIListener::depth_sub_ [protected] |
Definition at line 59 of file openni_listener.h.
m::Subscriber<s::CameraInfo> OpenNIListener::info_sub_ [protected] |
Definition at line 60 of file openni_listener.h.
ros::Publisher OpenNIListener::pub_cloud_ [protected] |
Definition at line 64 of file openni_listener.h.
ros::Publisher OpenNIListener::pub_ref_cloud_ [protected] |
Definition at line 66 of file openni_listener.h.
ros::Publisher OpenNIListener::pub_transf_cloud_ [protected] |
Definition at line 65 of file openni_listener.h.
unsigned int OpenNIListener::step_ [protected] |
Definition at line 70 of file openni_listener.h.
m::Synchronizer<MySyncPolicy> OpenNIListener::sync_ [protected] |
Definition at line 62 of file openni_listener.h.
m::Subscriber<s::Image> OpenNIListener::visual_sub_ [protected] |
Definition at line 58 of file openni_listener.h.