16 #include <sensor_msgs/Image.h> 17 #include <posedetection_msgs/ImageFeature0D.h> 19 #include <opencv2/highgui/highgui.hpp> 20 #include <boost/shared_ptr.hpp> 34 _sync = boost::make_shared<message_filters::Synchronizer<SyncPolicy> >(100);
42 const posedetection_msgs::Feature0DConstPtr& feature_msg)
48 feature_msg->positions,
50 feature_msg->orientations);
64 msg_ptr->features.positions,
65 msg_ptr->features.scales,
66 msg_ptr->features.orientations);
75 int main(
int argc,
char **argv)
77 ros::init(argc, argv,
"feature0d_to_image");
message_filters::Subscriber< posedetection_msgs::Feature0D > _sub_feature
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
std::string resolveName(const std::string &name, bool remap=true) const
void imagefeature_cb(const posedetection_msgs::ImageFeature0DConstPtr &msg_ptr)
boost::shared_ptr< message_filters::Synchronizer< SyncPolicy > > _sync
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
int main(int argc, char **argv)
ros::Subscriber _sub_imagefeature
ROSCPP_DECL void spin(Spinner &spinner)
virtual ~Feature0DToImage()
cv::Mat draw_features(const cv::Mat src, const std::vector< float > positions, const std::vector< float > scales, const std::vector< float > orientations)
CvImagePtr toCvCopy(const sensor_msgs::ImageConstPtr &source, const std::string &encoding=std::string())
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void subscribe(ros::NodeHandle &nh, const std::string &topic, uint32_t queue_size, const ros::TransportHints &transport_hints=ros::TransportHints(), ros::CallbackQueueInterface *callback_queue=0)
message_filters::Subscriber< sensor_msgs::Image > _sub_image