示例#1
0
 int
 configure(tendrils& params, tendrils& inputs, tendrils& outputs)
 {
   format_ = params.at("format");
   input_ = inputs.at("input");
   output_ = outputs.at("output");
 }
示例#2
0
 static void
 declare_params(tendrils& params)
 {
   object_recognition_core::db::bases::declare_params_impl(params);
   params.declare(&Detector::threshold_, "threshold", "Matching threshold, as a percentage", 90.0f);
   params.declare(&Detector::visualize_, "visualize", "If True, visualize the output.", false);
 }
 static void
 declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
 {
   inputs.declare(&MatToPointCloudXYZRGBOrganized::points3d, "points", "The width by height by 3 channels (x, y and z)").required(true);
   inputs.declare(&MatToPointCloudXYZRGBOrganized::image, "image", "The rgb image.").required(true);
   outputs.declare(&MatToPointCloudXYZRGBOrganized::cloud_out, "point_cloud", "The XYZRGB organized point cloud");
 }
示例#4
0
    static void
    declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
    {
      inputs.declare(&DepthCleaner::image_in_, "image", "The depth map").required(true);

      outputs.declare(&DepthCleaner::image_out_, "image", "The cleaned up depth image");
    }
示例#5
0
 static void
 declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
 {
   inputs.declare(&C::in1, "image1");
   inputs.declare(&C::in2, "image2");
   outputs.declare(&C::out, "out");
 }
示例#6
0
 static void
 declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
 {
   inputs.declare(&C::in_image, "image", "The input image, used as the base to draw on.");
   inputs.declare(&C::in_kpts, "keypoints", "The keypoints to draw.");
   outputs.declare(&C::out_image, "image", "The output image.");
 }
 static void
 declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
 {
   inputs.declare(&MatToPointCloudXYZ::points3d, "points",
                  "The width by height by 3 channels (x, y and z)");
   outputs.declare(&MatToPointCloudXYZ::cloud_out, "point_cloud",
                   "The XYZ point cloud");
 }
 static void
 declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
 {
   inputs.declare(&MatToPointCloudXYZRGB::image, "image", "The rgb image.").required(true);
   inputs.declare(&MatToPointCloudXYZRGB::points3d, "points", "The 3d points.").required(true);
   inputs.declare(&MatToPointCloudXYZRGB::mask, "mask", "The binary mask for valid points.");
   outputs.declare(&MatToPointCloudXYZRGB::cloud_out, "point_cloud", "The XYZRGB point cloud");
 }
示例#9
0
    static void
    declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
    {
      inputs.declare(&ClusterDrawer::clusters2d_, "clusters2d", "For each table, a vector of 2d clusters.");
      inputs.declare(&ClusterDrawer::image_, "image", "The image to draw on.").required(true);

      outputs.declare(&ClusterDrawer::image_clusters_, "image", "The depth image with the convex hulls for the planes.");
    }
示例#10
0
 static void
 declare_params(tendrils& p)
 {
   p.declare(&C::n_iters, "n_iters", "number of ransac iterations", 100);
   p.declare(&C::reprojection_error, "reprojection_error", "error threshold", 8);
   p.declare(&C::min_inliers, "min_inliers", "minimum number of inliers", 25);
   p.declare(&C::inlier_thresh, "inlier_thresh", "The inlier threshold of pose found.", 30);
 }
示例#11
0
    static void
    declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
    {
      inputs.declare(&ObjectRecognizer::clusters_, "clusters3d", "The object clusters.").required(true);
      inputs.declare(&ObjectRecognizer::table_coefficients_, "table_coefficients", "The coefficients of planar surfaces.").required(true);

      outputs.declare(&ObjectRecognizer::pose_results_, "pose_results", "The results of object recognition");
    }
示例#12
0
    static void
    declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
    {
      inputs.declare(&Detector::color_, "image", "An rgb full frame image.");
      inputs.declare(&Detector::depth_, "depth", "The 16bit depth image.");

      outputs.declare(&Detector::pose_results_, "pose_results", "The results of object recognition");
    }
示例#13
0
    static void
    declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
    {
      inputs.declare(&PlaneDrawer::image_, "image", "The current gray frame.").required(true);
      inputs.declare(&PlaneDrawer::planes_, "planes", "The different found planes (a,b,c,d) of equation ax+by+cz+d=0.");
      inputs.declare(&PlaneDrawer::masks_, "masks", "The masks for each plane.");

      outputs.declare(&PlaneDrawer::image_clusters_, "image", "The depth image with the convex hulls for the planes.");
    }
示例#14
0
    static void
    declare_params(tendrils& params)
    {
      params.declare(&MModTrainer::thresh_learn,"thresh_learn","The threshold"
                                              "for learning a new template",0.0); //Zero thresh_learn => learn every view
      params.declare(&MModTrainer::object_id,"object_id",
                                             "The object id, to learn.")
                                             .required(true);

    }
示例#15
0
  static void declare_io(const tendrils& params, tendrils& inputs,
                         tendrils& outputs) {
    inputs.declare(&ClusterConverter::clusters3d_, "clusters3d",
                   "The clusters on top of the table.").required(true);
    inputs.declare(&ClusterConverter::image_message_,
                   "image_message", "the image message to get the header").required(true);

    outputs.declare<sensor_msgs::PointCloud2ConstPtr>(
      "cluster_pc", "The PointCloud2 message of the top cluster");
  }
示例#16
0
    static void
    declare_io(const tendrils& p, tendrils& i, tendrils& o)
    {
        i.declare<std::vector<ObjectId> >("ids", "The matching object ids");

        i.declare(&MModTester::image_, "image", "An image. BGR image of type CV_8UC3").required(true);
        i.declare(&MModTester::depth_, "depth", "Depth image of type CV_16UC1").required(true);
        //      i.declare<cv::Mat> ("mask", "Object mask of type CV_8UC1 or CV_8UC3").required(false);
        o.declare(&MModTester::debug_image_, "debug_image", "Debug image.");
    }
  static void declare_io(const tendrils& params, tendrils& inputs,
                         tendrils& outputs) {
    inputs.declare(&TableVisualizationMsgAssembler::clusters3d_, "clusters3d",
                   "The clusters on top of the table.").required(true);
    inputs.declare(&TableVisualizationMsgAssembler::image_message_,
                   "image_message", "the image message to get the header").required(true);

    outputs.declare<visualization_msgs::MarkerArrayConstPtr>(
      "marker_array_clusters", "The markers of the clusters");
  }
 static void
 declare_io(const tendrils& params, tendrils& in, tendrils& out)
 {
   in.declare(&StereoCalibration::image_, "image", "An image to base the size of of.").required(true);
   in.declare(&StereoCalibration::object_pts_, "points_object", "The ideal object points.").required(true);
   in.declare(&StereoCalibration::pts_left_, "points_left", "The observed 2d points in the left camera.").required(
       true);
   in.declare(&StereoCalibration::pts_right_, "points_right", "The observed 2d points in the right camera.").required(
       true);
 }
示例#19
0
文件: TickCheck.cpp 项目: norro/ecto
 int process(const tendrils& in, const tendrils& out)
 {
     for (tendrils::const_iterator iter = in.begin(), end = in.end(); iter!=end; ++iter)
     {
         std::cout << iter->second->tick << " >>?>> " << tick << "\n";
         if (iter->second->tick != tick)
             abort();
     }
     ++tick;
     return ecto::OK;
 }
示例#20
0
    static void
    declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
    {
      inputs.declare(&PlaneFinder::points3d_, "point3d", "The current depth frame.").required(true);
      inputs.declare(&PlaneFinder::K_, "K", "The calibration matrix").required(true);
      inputs.declare(&PlaneFinder::normals_, "normals", "The normals");

      outputs.declare(&PlaneFinder::planes_, "planes",
                      "The different found planes (a,b,c,d) of equation ax+by+cz+d=0.");
      outputs.declare(&PlaneFinder::masks_, "masks", "The masks for each plane.");
    }
示例#21
0
    static void
    declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
    {
    inputs.declare(&Trainer::json_db_, "json_db", "The DB parameters", "{}").required(
        true);
    inputs.declare(&Trainer::object_id_, "object_id",
        "The object id, to associate this model with.").required(true);

      outputs.declare(&Trainer::detector_, "detector", "The LINE-MOD detector");
      outputs.declare(&Trainer::Rs_, "Rs", "The matching rotations of the templates");
      outputs.declare(&Trainer::Ts_, "Ts", "The matching translations of the templates.");
    }
    static void
    declare_io(const tendrils& params, tendrils& i, tendrils& o)
    {
      //inputs coming off of the kinect.
      i.declare(&C::depth_, "depth", "The depth stream.").required(true);
      i.declare(&C::image_, "image", "The image stream.").required(true);
      i.declare(&C::focal_length_image_, "focal_length_image", "The focal length of the image stream.").required(true);
      i.declare(&C::focal_length_depth_, "focal_length_depth", "The focal length of the depth stream.").required(true);
      i.declare(&C::baseline_, "baseline", "The base line of the openni camera.").required(true);

      o.declare(&C::cam, "camera", "A pinhole camera model to convert.");
    }
示例#23
0
	/*! @brief declare parameters used by the detector
	 *
	 * This method defines the mapping between the python members loaded
	 * from the config file, and the members declared in this class. This
	 * is called once at initialization, and again in instances of
	 * dynamic reconfiguration
	 *
	 * @param params the parameters
	 */
	static void declare_params(tendrils& params)
	{
		params.declare(&PartsBasedDetectorCell::visualize_, "visualize",
				"Visualize results", false);
		params.declare(&PartsBasedDetectorCell::remove_planes_, "remove_planes",
				"The cell should remove planes from the scene before the cluster extraction", false);
		params.declare(&PartsBasedDetectorCell::model_file_, "model_file",
				"The path to the model file").required(true);
		params.declare(&PartsBasedDetectorCell::max_overlap_, "max_overlap",
				"The maximum overlap allowed between object detections", 0.1);
		params.declare(&PartsBasedDetectorCell::object_db_, "db",
				"The object db.", ObjectDb());
	}
示例#24
0
 void configure(const tendrils& p, const tendrils& in, const tendrils& out)
 {
   for(unsigned int i=0; i<in.size(); i++){
     inputs_.push_back(in[And::get_input_string(i)]);
   }
   output_ = out["out"];
 }
示例#25
0
 static void
 declare_io(const tendrils& p, tendrils& inputs, tendrils& outputs)
 {
   inputs.declare(&C::train_2d, "train_2d", "The 2d training points.");
   inputs.declare(&C::test_2d, "test_2d", "The 2d test points.");
   inputs.declare(&C::train_3d, "train_3d", "The 3d training points.");
   inputs.declare(&C::test_3d, "test_3d", "The 3d test points.");
   inputs.declare(&C::matches_in, "matches", "The descriptor matches.");
   outputs.declare(&C::matches_out, "matches", "The verified matches.");
   outputs.declare(&C::matches_mask, "matches_mask", "The matches mask, same size as the original matches.");
   outputs.declare(&C::R_out, "R");
   outputs.declare(&C::T_out, "T");
   outputs.declare(&C::found_out, "found");
 }
 static void
 declare_io(const tendrils& params, tendrils& in, tendrils& out)
 {
   in.declare(&C::R1,"R1", "3x3 Rotation matrix.");
   in.declare(&C::T1,"T1", "3x1 Translation vector.");
   in.declare(&C::R2,"R2", "3x3 Rotation matrix.");
   in.declare(&C::T2,"T2", "3x1 Translation vector.");
   out.declare(&C::R,"R", "3x3 Rotation matrix.");
   out.declare(&C::T,"T", "3x1 Translation vector.");    }
示例#27
0
 void configure(tendrils& p, tendrils& inputs, tendrils& outputs)
 {
   image_ = inputs.at("image");
   circles_ = outputs.at("circles");
   dp = p.at("dp");
   minDist = p.at("minDist");
   param1 = p.at("param1");
   param2 = p.at("param2");
   minRad = p.at("minRadius");
   maxRad = p.at("maxRadius");
 }
示例#28
0
 static void
 declare_io(const tendrils& p, tendrils& inputs, tendrils& outputs)
 {
   typedef MatchRefinement C;
   inputs.declare(&C::train, "train", "The training kpts.");
   inputs.declare(&C::test, "test", "The test kpts.");
   inputs.declare(&C::matches_in, "matches", "The descriptor matches.");
   outputs.declare(&C::matches_out, "matches", "The verified matches.");
   outputs.declare(&C::matches_mask, "matches_mask", "The matches mask, same size as the original matches.");
   outputs.declare(&C::H_out, "H", "The estimated homography.");
 }
示例#29
0
 static void
 declare_io(const tendrils& p, tendrils& inputs, tendrils& outputs)
 {
   typedef MatchRefinement3d C;
   inputs.declare(&C::train, "train", "The 3d training points.");
   inputs.declare(&C::test, "test", "The 3d test points.");
   inputs.declare(&C::matches_in, "matches", "The descriptor matches.");
   outputs.declare(&C::matches_out, "matches", "The verified matches.");
   outputs.declare(&C::matches_mask, "matches_mask", "The matches mask, same size as the original matches.");
   outputs.declare(&C::R_out, "R");
   outputs.declare(&C::T_out, "T");
 }
示例#30
0
 static void
 declare_params(tendrils& params)
 {
   params.declare(&PlaneFinder::block_size_, "block_size",
                  "Size of a block to check if it belongs to a plane (in pixels).", 40);
   params.declare(&PlaneFinder::threshold_, "threshold", "Error (in meters) for how far a point is on a plane.",
                  0.02);
   params.declare(&PlaneFinder::sensor_error_a_, "sensor_error_a",
                  "a coefficient of the quadratic sensor error err=a*z^2+b*z+c. 0.0075 fo Kinect.", 0.0);
   params.declare(&PlaneFinder::sensor_error_b_, "sensor_error_b",
                  "b coefficient of the quadratic sensor error err=a*z^2+b*z+c. 0.0 fo Kinect.", 0.0);
   params.declare(&PlaneFinder::sensor_error_c_, "sensor_error_c",
                  "c coefficient of the quadratic sensor error err=a*z^2+b*z+c. 0.0 fo Kinect.", 0.0);
   params.declare(&PlaneFinder::window_size_, "window_size", "The window size for smoothing.", 5);
   params.declare(&PlaneFinder::normal_method_, "normal_method", "The window size for smoothing.",
                  cv::RgbdNormals::RGBD_NORMALS_METHOD_FALS);
 }