/// initialize tof camera viewer. /// @return <code>false</code> on failure, <code>true</code> otherwise bool init() { /// Create viewer windows cvStartWindowThread(); cvNamedWindow("z data"); cvNamedWindow("grey data"); xyz_image_subscriber_ = image_transport_.subscribe("image_xyz", 1, &CobTofCameraViewerNode::xyzImageCallback, this); grey_image_subscriber_ = image_transport_.subscribe("image_grey", 1, &CobTofCameraViewerNode::greyImageCallback, this); return true; }
ImageConverter() : it_(nh_) { // Subscribe to input video feed and publish output video feed image_sub_ = it_.subscribe("/davinci/left_camera/image_raw", 1, &ImageConverter::imageCb, this); image_pub_ = it_.advertise("/image_converter/output_video", 1); //extend to right camera: image_sub_right_ = it_.subscribe("/davinci/right_camera/image_raw", 1, &ImageConverter::imageCbRight, this); cv::namedWindow(OPENCV_WINDOW); }
ImageConverter() : it(nh) { image_sub1 = it.subscribe("/camera/image_raw", 1, &ImageConverter::imageCb1, this); image_sub2 = it.subscribe("/camera/output_video_gui", 1, &ImageConverter::imageCb2, this); image_sub3 = it.subscribe("/camera/output_video", 1, &ImageConverter::imageCb3, this); image_sub4 = it.subscribe("/camera/search_region", 1, &ImageConverter::imageCb4, this); image_pub = it.advertise("/camera/stitched", 1); }
ImageConverter() : it_(nh_) { image_pub_ = it_.advertise("out", 1); image_sub_ = it_.subscribe("camera/image_raw", 1, &ImageConverter::imageCallback, this); depth_sub_ = it_.subscribe("/depth/image_raw", 1, &ImageConverter::imageCallback2, this); //sub_ = nh_.subscribe<nav_msgs::Odometry>("/odom", 1000, &ImageConverter::odomCB, this); prev_img = Mat::zeros(480, 640, CV_8UC1); curr_img = Mat::zeros(480, 640, CV_8UC1); Horn_H = Mat::zeros(480, 640, CV_32FC1); Horn_V = Mat::zeros(480, 640, CV_32FC1); cv::namedWindow(WINDOW); cv::namedWindow(WINDOW2); //cout<<"test"<<endl; }
Target_XYWH() : it_(nh_) { // Subscrive to input video feed and publish output video feed image_sub_ = it_.subscribe("/camera/image_raw", 1, &Target_XYWH::imageCb, this); image_pub_ = it_.advertise("/target_xywh/output_video", 1); target_xywh_pub_ = nh_.advertise<std_msgs::Float32MultiArray>("/target_xywh", 1000); cmd_pub_ = nh_.advertise<geometry_msgs::Twist>("/andbot/cmd_vel_camera", 1); // std_msgs::Float32MultiArray array; brray.data.clear(); for (int i=0; i<4; i++) brray.data.push_back(0.0); // cv::namedWindow(OPENCV_WINDOW); //Load the cascades if (!face_cascade.load(face_cascade_name)) { printf("--(!)Error loading face cascade\n"); }; gettimeofday(&tp, NULL); start_time = tp.tv_sec * 1000000 + tp.tv_usec; }
ImageConverter():it_(nh_) { // Subscrive to input video feed and publish output video feed image_sub_ = it_.subscribe("/camera/image_raw", 1, &ImageConverter::imageCb, this); image_pub_ = it_.advertise("/legoDetection/output_video", 1); cv::namedWindow(OPENCV_WINDOW); }
ImageConverter() : it_(nh_) { int scale; if (nh_.getParam("/processingScale", scale)) { processingScale = scale; } else { processingScale = 1; } double mTm; if (nh_.getParam("/majorToMinor", mTm)) { majorToMinor = mTm; } else { majorToMinor = 2; } std::cout << " Scale: " << processingScale << std::endl; std::cout << " mTm: " << majorToMinor << std::endl; image_pub_ = it_.advertise("out", 1); image_sub_ = it_.subscribe("in", 1, &ImageConverter::imageCb, this); cv::namedWindow(WINDOW); circle_pub = nh_.advertise<std_msgs::Float64MultiArray>("circle_data", 10); circle_data.data.resize(12); }
Thresholder(bool show, bool maker, int* input_thresholds, string name, string input) : it_(nh_) { image_pub_ = it_.advertise("vision/thresholder_"+name, 1); image_sub_ = it_.subscribe(input , 1, &Thresholder::process, this); SHOW_IMAGES = show; SHOW_MAKER = maker; for(int i = 0; i < 13; i++) thresholds[i] = input_thresholds[i]; if(SHOW_MAKER){ namedWindow("Thresholder"); createTrackbar("H+","Thresholder",&thresholds[0], H_MAX); createTrackbar("H-","Thresholder",&thresholds[1], H_MAX); createTrackbar("H~","Thresholder",&thresholds[2], BOOL); createTrackbar("S+","Thresholder",&thresholds[3], SVBGR_MAX); createTrackbar("S-","Thresholder",&thresholds[4], SVBGR_MAX); createTrackbar("V+","Thresholder",&thresholds[5], SVBGR_MAX); createTrackbar("V-","Thresholder",&thresholds[6], SVBGR_MAX); createTrackbar("B+","Thresholder",&thresholds[7], SVBGR_MAX); createTrackbar("B-","Thresholder",&thresholds[8], SVBGR_MAX); createTrackbar("G+","Thresholder",&thresholds[9], SVBGR_MAX); createTrackbar("G-","Thresholder",&thresholds[10], SVBGR_MAX); createTrackbar("R+","Thresholder",&thresholds[11], SVBGR_MAX); createTrackbar("R-","Thresholder",&thresholds[12], SVBGR_MAX); } if (SHOW_IMAGES) { namedWindow("Input Video"); namedWindow("Output Video"); } }
ArucoMarkerPublisher() : cam_info_received_(false), nh_("~"), it_(nh_) { image_sub_ = it_.subscribe("/image", 1, &ArucoMarkerPublisher::image_callback, this); cam_info_sub_ = nh_.subscribe("/camera_info", 1, &ArucoMarkerPublisher::cam_info_callback, this); image_pub_ = it_.advertise("result", 1); debug_pub_ = it_.advertise("debug", 1); marker_pub_ = nh_.advertise<aruco_msgs::MarkerArray>("markers", 100); nh_.param<double>("marker_size", marker_size_, 0.05); nh_.param<std::string>("reference_frame", reference_frame_, ""); nh_.param<std::string>("camera_frame", camera_frame_, ""); nh_.param<bool>("image_is_rectified", useRectifiedImages_, true); //nh.param<int>("marker_id", marker_id, 300); //nh_.param<std::string>("marker_frame", marker_frame_, ""); //ROS_ASSERT(camera_frame_ != "" && marker_frame_ != ""); ROS_ASSERT(! camera_frame_.empty()); if ( reference_frame_.empty() ) reference_frame_ = camera_frame_; //ROS_INFO("Aruco node started with marker size of %f m and marker id to track: %d", //marker_size, marker_id); //ROS_INFO("Aruco node will publish pose to TF with %s as parent and %s as child.", //reference_frame_.c_str(), marker_frame_.c_str()); marker_msg_ = aruco_msgs::MarkerArray::Ptr( new aruco_msgs::MarkerArray() ); marker_msg_->header.frame_id = reference_frame_; marker_msg_->header.seq = 0; }
ImageConverter(char* ros_image_stream, char* ros_output_stream) : it_(nh_) { image_pub_ = it_.advertise(ros_output_stream, 1); image_sub_ = it_.subscribe(ros_image_stream, 1, &ImageConverter::imageCb, this); }
LineMOD_Detector(): it(nh) { color_sub = it.subscribe("color", 1, &LineMOD_Detector::colorCallback, this); depth_sub = nh.subscribe("depth", 1, &LineMOD_Detector::depthCallback, this); disp_sub = nh.subscribe("disparity", 1, &LineMOD_Detector::disparityCallback, this); cam_info_sub = nh.subscribe("cam_info", 1, &LineMOD_Detector::cameraInfoCallback, this); img_point_pub = nh.advertise<samplereturn_msgs::NamedPoint>("img_point", 1); point_pub = nh.advertise<samplereturn_msgs::NamedPoint>("point", 1); matching_threshold = 80; got_color = false; K = cv::Mat(3,3,CV_64FC1); inv_K = cv::Mat(3,3,CV_64FC1); std::string filename; ros::param::get("~template_file", filename); ros::param::get("~pub_threshold", LineMOD_Detector::pub_threshold); ros::param::get("~min_depth", LineMOD_Detector::min_depth); ros::param::get("~max_depth", LineMOD_Detector::max_depth); ros::param::get("~min_count", LineMOD_Detector::min_count); ROS_DEBUG("Pub Threshold:%f ", LineMOD_Detector::pub_threshold); // Initialize LINEMOD data structures detector = readLinemod(filename); num_modalities = (int)detector->getModalities().size(); std::cout << num_modalities << std::endl; }
ImageConverter() : it_(nh_) { image_sub_ = it_.subscribe("/camera/image_raw", 1, &ImageConverter::imageCb, this); char temp[25]; for(int i=0;i<NO_BOTS;i++) { sprintf(temp,"/nxt%d/pose",i); bot_pose_topic[i]=temp; sprintf(temp,"bot%d_plan",i); bot_window[i]=temp; } bot_pose_sub[0]=nh_.subscribe(bot_pose_topic[0],1,&ImageConverter::bot0PoseCb,this); bot_pose_sub[1]=nh_.subscribe(bot_pose_topic[1],1,&ImageConverter::bot1PoseCb,this); bot_pose_sub[2]=nh_.subscribe(bot_pose_topic[2],1,&ImageConverter::bot2PoseCb,this); cv::namedWindow("result", CV_WINDOW_AUTOSIZE); #ifdef TEST_IMAGE for(int i=0;i<NO_BOTS;i++) { sprintf(temp,"bot%d_intensity",i); string label=temp; light_intensity[i]=(i+2)*10; cv::createTrackbar(label, "result", &light_intensity[i], 255, 0); //Hue varies between 0 and 180 } #endif #ifdef LAB // for(int i=0;i<NO_BOTS;i++) // { // sprintf(temp,"Bot%dIntensityCb",i); // string callback=temp; // sprintf(temp,"Bot%dIntensityCb",i); // string callback=temp; // // } bot_intensity_sub[0]=nh_.subscribe("/nxt0/intensity",1,&ImageConverter::bot0IntensityCb,this); bot_intensity_sub[1]=nh_.subscribe("/nxt1/intensity",1,&ImageConverter::bot1IntensityCb,this); bot_intensity_sub[2]=nh_.subscribe("/nxt2/intensity",1,&ImageConverter::bot2IntensityCb,this); #endif target_intensity=5; cv::createTrackbar( "Target Intensity", "result", &target_intensity, 255, 0); repelling_radius=100; cv::createTrackbar( "Repelling Radius", "result", &repelling_radius, 250, 0); text_size_height=12; bot_goal[0]=false; bot_goal[1]=false; bot_goal[2]=false; frame_count=0; for(int i=0;i<NO_BOTS;i++) { sprintf(temp,"/nxt%d/cmd_vel",i); string nxt_command_topic=temp; nxt_command_pub[i]=nh_.advertise<geometry_msgs::Twist>(nxt_command_topic,1); } }
public: ImageConverter(bool isStaticImage, char* staticImage) : it_(nh_) { ROS_INFO("===========Entered constructor==========="); threshCanny = 255; threshVal = 117; max_thresh = 255; minRectSize = 1200; maxRectSize = 50000; rng = RNG(12345); namedWindow(WINDOW); namedWindow(CANNY_WINDOW); namedWindow(THRESHOLD_WINDOW); createTrackbar( " Canny thresh:", CANNY_WINDOW, &threshCanny, max_thresh, &processImageCallback, this ); createTrackbar( " Thresholding:", THRESHOLD_WINDOW, &threshVal, max_thresh, &processImageCallback, this ); createTrackbar( " Min Rect Size:", WINDOW, &minRectSize, maxRectSize, &processImageCallback, this ); ROS_INFO("Initialization finished."); //image_pub_ = it_.advertise("out", 1); if (!isStaticImage) {//staticImage[0] == '\0') { ROS_INFO("No static image - stream from camera."); image_sub_ = it_.subscribe("/wide_stereo/left/image_rect_color", 1, &ImageConverter::imageCb, this); } else { ROS_INFO("Static image found."); ROS_INFO(staticImage); src = imread(staticImage, 1 ); processImageCallback(0, this); waitKey(0); } }
ImageConverter() : it_(nh_) { image_pub_ = it_.advertise("out", 1); image_sub_ = it_.subscribe("/camera/image_raw", 1, &ImageConverter::imageCb, this); cv::namedWindow(WINDOW); int temp=10; cv::createTrackbar( " TresholdEllipse ", WINDOW, &temp, 255, NULL); // cv::createTrackbar( " R0: ", WINDOW, &temp, 255, NULL); // temp=170; // cv::createTrackbar( " G0: ", WINDOW, &temp, 255, NULL); // temp=170; // cv::createTrackbar( " B0: ", WINDOW, &temp, 255, NULL); // temp=55; // cv::createTrackbar( " R1: ", WINDOW, &temp, 255, NULL); // temp=255; // cv::createTrackbar( " G1: ", WINDOW, &temp, 255, NULL); // temp=255; // cv::createTrackbar( " B1: ", WINDOW, &temp, 255, NULL); temp=150; cv::createTrackbar(" Threshold:",WINDOW,&temp,400,NULL); temp=4; cv::createTrackbar(" Dilate:",WINDOW,&temp,10,NULL); CameraCalibMat[0][2]=640; CameraCalibMat[1][2]=480; cv::setMouseCallback(WINDOW,ImageConverter::onMouse,&src_HSV); cv::namedWindow(WINDOW2); }
ArSysSingleBoard() : cam_info_received(false), foundBoard(false), nh("~"), it(nh) { image_sub = it.subscribe("/image", 1, &ArSysSingleBoard::image_callback, this); cam_info_sub = nh.subscribe("/camera_info", 1, &ArSysSingleBoard::cam_info_callback, this); image_pub = it.advertise("result", 1); debug_pub = it.advertise("debug", 1); //Added///////////////////////////////////////////////////////////////// rvec_pub = it.advertise("rvec",1); tvec_pub = it.advertise("tvec",1); boardSize_pub = nh.advertise<std_msgs::Float32>("boardSize", 100); /////////////////////////////////////////////////////////////////// pose_pub = nh.advertise<geometry_msgs::PoseStamped>("pose", 100); transform_pub = nh.advertise<geometry_msgs::TransformStamped>("transform", 100); position_pub = nh.advertise<geometry_msgs::Vector3Stamped>("position", 100); nh.param<double>("marker_size", marker_size, 0.05); nh.param<std::string>("board_config", board_config, "boardConfiguration.yml"); nh.param<std::string>("board_frame", board_frame, ""); nh.param<bool>("image_is_rectified", useRectifiedImages, true); nh.param<bool>("draw_markers", draw_markers, false); nh.param<bool>("draw_markers_cube", draw_markers_cube, false); nh.param<bool>("draw_markers_axis", draw_markers_axis, false); nh.param<bool>("publish_tf", publish_tf, false); the_board_config.readFromFile(board_config.c_str()); ROS_INFO("Modified ArSys node started with marker size of %f m and board configuration: %s", marker_size, board_config.c_str()); }
AutoFocusClient (std::string tpc): ac_("auto_focus", true), it_(nh_), topic_(tpc) { image_sub_ = it_.subscribe(topic_, 1, &AutoFocusClient::imageCB, this); time(&initTime_); init_ = true; maxValue_ = -1; }
ShooterVision() : nh_(ros::this_node::getName()), it_(nh_) { nh_.param<bool>("auto_start", active, false); vision.reset(new GrayscaleContour(nh_)); vision->init(); nh_.param<std::string>("symbol_camera", camera_topic, "/right/right/image_raw"); std::string get_shapes_topic; nh_.param<std::string>("get_shapes_topic",get_shapes_topic,"get_shapes"); runService = nh_.advertiseService(get_shapes_topic+"/switch", &ShooterVision::runCallback, this); roiService = nh_.advertiseService("setROI", &ShooterVision::roiServiceCallback, this); //#ifdef DO_DEBUG // DebugWindow::init(); //#endif foundShapesPublisher = nh_.advertise<navigator_msgs::DockShapes>( "found_shapes", 1000); image_sub_ = it_.subscribe(camera_topic, 1, &ShooterVision::run, this); int x_offset, y_offset, width, height; nh_.param<int>("roi/x_offset", x_offset, 73); nh_.param<int>("roi/y_offset", y_offset, 103); nh_.param<int>("roi/width", width, 499); nh_.param<int>("roi/height", height, 243); nh_.param<int>("size/height", size.height, 243); nh_.param<int>("size/width", size.width, 243); roi = Rect(x_offset, y_offset, width, height); TrackedShape::init(nh_); tracker.init(nh_); }
SceneSegmentation() : nh_("~"), it_(nh_) { nh_.param<float>("sigma", sigma_, 0.5f); nh_.param<float>("k", k_, 500.f); nh_.param<int>("min", min_, 20); nh_.param<bool>("half", half_, true); bool draw_rect; nh_.param<bool>("draw_rect", draw_rect, true); ROS_INFO("Waiting for message on camera info topic."); camera_info_ = ros::topic::waitForMessage<sensor_msgs::CameraInfo>("camera_info", nh_); // segmentor_ = Segmentor::Ptr(new Segmentor(camera_info_->width, camera_info_->height, half_)); if(half_) segmentor_ = Segmentor::Ptr(new Segmentor(camera_info_->width/2, camera_info_->height/2, draw_rect)); else segmentor_ = Segmentor::Ptr(new Segmentor(camera_info_->width, camera_info_->height, draw_rect)); srv_segment_ = nh_.advertiseService("segment_image", &SceneSegmentation::segment_image_cb, this); ROS_INFO("segment_image is ready."); sub_image_ = it_.subscribe("image_in", 1, &SceneSegmentation::image_cb, this); pub_image_ = it_.advertise("image_out", 1); pub_rects_ = nh_.advertise<duckietown_msgs::Rects>("rects_out", 1); pub_segments_ = nh_.advertise<duckietown_msgs::SceneSegments>("segments_out", 1); }
TextReader(const char* correlation, const char* dictionary) : it_(nh_)//, cloud(new pcl::PointCloud<pcl::PointXYZRGB>), viewer(new pcl::visualization::PCLVisualizer("3D Viewer")) { /* * advertise on topic "text_detect" the result * subscribe on topic "image_color" for the camera picture with Callback-function "imageCb" * subscribe on topic "/base_odometry/state" with Callback-function "robotStateCb" for detecting camera movement */ image_pub_ = it_.advertise("text_detect", 1); image_sub_ = it_.subscribe("image_color", 1, &TextReader::imageCb, this); robot_state_sub_ = nh_.subscribe("/base_odometry/state", 1, &TextReader::robotStateCb, this); // depth_sub_ = nh_.subscribe("/camera/depth_registered/points", 1, &TextReader::depthCb, this); detector = DetectText(); detector.readLetterCorrelation(correlation); detector.readWordList(dictionary); pthread_mutex_init(&pr2_velocity_lock_, NULL); pthread_mutex_init(&pr2_image_lock_, NULL); okToDetect_ = false; initialized_ = false; x_ = 0; y_ = 0; }
ArucoSimple() : cam_info_received(false), nh("~"), it(nh) { image_sub = it.subscribe("/image", 1, &ArucoSimple::image_callback, this); cam_info_sub = nh.subscribe("/camera_info", 1, &ArucoSimple::cam_info_callback, this); image_pub = it.advertise("result", 1); debug_pub = it.advertise("debug", 1); pose_pub = nh.advertise<geometry_msgs::Pose>("pose", 100); nh.param<double>("marker_size", marker_size, 0.05); nh.param<int>("marker_id", marker_id, 300); nh.param<std::string>("parent_name", parent_name, ""); nh.param<std::string>("child_name", child_name, ""); nh.param<bool>("image_is_rectified", useRectifiedImages, true); ROS_ASSERT(parent_name != "" && child_name != ""); ROS_INFO("Aruco node started with marker size of %f m and marker id to track: %d", marker_size, marker_id); ROS_INFO("Aruco node will publish pose to TF with %s as parent and %s as child.", parent_name.c_str(), child_name.c_str()); }
ImageConverter() : it_(nh_) { image_pub_ = it_.advertise("out", 1); image_sub_ = it_.subscribe("usb_cam/image_raw", 1, &ImageConverter::imageCb, this); cv::namedWindow(WINDOW); }
ImageConverter() : it_(nh_) { image_pub_ = it_.advertise("output_image", 1); image_sub_ = it_.subscribe("input_image", 1, &ImageConverter::imageCb, this); //for blob detection params.minDistBetweenBlobs = 10.0; // minimum 10 pixels between blobs params.filterByArea = true; // filter my blobs by area of blob params.minArea = 100; // min 100 pixels squared params.blobColor = 255; // params.maxArea = 5000.0; // max 500 pixels squared // params.minThreshold = 0; // params.maxThreshold = 5; // params.thresholdStep = 5; // // params.minArea = 10; // params.minConvexity = 0.3; // params.minInertiaRatio = 0.01; // // params.maxArea = 8000; // params.maxConvexity = 10; // // params.filterByColor = false; // params.filterByCircularity = false; blobDetector = new SimpleBlobDetector( params ); blobDetector->create("SimpleBlob"); cv::namedWindow(WINDOW); }
ImageConverter() : it_(nh_) { image_sub_ = it_.subscribe("/camera/front/image_raw", 1, &ImageConverter::imageCb, this); image_pub_ = it_.advertise("/image_converter/output_video", 1); cv::namedWindow(OPENCV_WINDOW); }
ImageConverter() : it_(nh_) { image_sub_ = it_.subscribe("/camera/rgb/image_color", 1, &ImageConverter::imageCb, this); ready = false; cv::namedWindow("Image window"); }
ArdroneTracker() : it_(nh_), useColorTracker_( true ), morphSize_( 15, 15 ), targetSize_( 10 ), hValue_( 30 ), hRange_( 50 ), matchThreshold_( 1.0 ), missesInARow_( 0 ), dampingFactor_( 0.9 ), surf_ ( 2500 ) { imageSub_ = it_.subscribe("/ardrone/front/image_raw", 1, &ArdroneTracker::imageCb, this); thresholdPub_ = it_.advertise("/ardrone_tracker/image_threshold", 1 ); histPub_ = it_.advertise( "/ardrone_tracker/image_histogram", 1 ); morphPub_ = it_.advertise( "/ardrone_tracker/image_morphed", 1 ); centersPub_ = it_.advertise("/ardrone_tracker/image_centers", 1 ); pointPub_ = nh_.advertise<geometry_msgs::Point>("/ardrone_tracker/found_point", 1); morphSizeSub_ = nh_.subscribe( "/ardrone_tracker/control/morph_size", 1, &ArdroneTracker::morphSizeCb, this ); targetSizeSub_ = nh_.subscribe( "/ardrone_tracker/control/target_size", 1, &ArdroneTracker::targetSizeCb, this ); hValueSub_ = nh_.subscribe( "/ardrone_tracker/control/h_value", 1, &ArdroneTracker::hValueCb, this ); hRangeSub_ = nh_.subscribe( "/ardrone_tracker/control/h_range", 1, &ArdroneTracker::hRangeCb, this ); matchThreshSub_ = nh_.subscribe( "/ardrone_tracker/control/match_threshold", 1, &ArdroneTracker::matchThreshCb, this ); roundelSource_ = cv::imread( "/home/sameer/Dropbox/Linux XFer/Roundel.png", 1 ); matchContour_ = getMatchContour(); calcMatchKeyPoints(); }
ImageConverter() : it_(nh_) { pub= n.advertise<turtlesim::Velocity>("/drocanny/vanishing_points", 500);// image_sub_ = it_.subscribe("/ardrone/image_raw", 1, &ImageConverter::imageCb, this); image_pub_= it_.advertise("/arcv/Image",1); }
ImageConverter() : it_(nh_) { image_sub_ = it_.subscribe("thermal_image_out", 1, &ImageConverter::imageCb, this); cv::namedWindow(OPENCV_WINDOW); }
ImageConverter() : it_(nh_) { // Subscrive to input video feed and publish output video feed image_sub_ = it_.subscribe(CAMERA_TOPIC, 1, &ImageConverter::imageCb, this); image_pub_ = it_.advertise("/image_converter/output_video", 1); }
recorder() : it_(nh_) { image_rgb_ = it_.subscribe("/camera/rgb/image_color", 1, &recorder::imageCb_rgb, this); //image_depth_ = it_.subscribe("/camera/depth/image",1,&recorder::imageCb_di,this); }
ImageCropper(): it_(nh_) { // Subscribe to input video feed and publish output video feed image_sub_ = it_.subscribe(camera_topic, 1, &ImageCropper::imageCb, this); image_pub_ = it_.advertise("/front_kinect/rgb/image_cropped", 1); /* Have to crop the depth data too to use this for find object3d*/ }