38 #ifndef PCL_RECOGNITION_LINEMOD_LINE_RGBD
39 #define PCL_RECOGNITION_LINEMOD_LINE_RGBD
41 #include <pcl/recognition/linemod.h>
42 #include <pcl/recognition/color_gradient_modality.h>
43 #include <pcl/recognition/surface_normal_modality.h>
44 #include <pcl/io/tar.h>
72 template <
typename Po
intXYZT,
typename Po
intRGBT=Po
intXYZT>
81 Detection () : template_id (0), object_id (0), detection_id (0), response (0.0f), bounding_box () {}
99 : intersection_volume_threshold_ (1.0f)
101 , color_gradient_mod_ ()
102 , surface_normal_mod_ ()
105 , template_point_clouds_ ()
129 loadTemplates (
const std::string &file_name,
size_t object_id = 0);
138 setDetectionThreshold (
float threshold)
140 linemod_.setDetectionThreshold (threshold);
148 setGradientMagnitudeThreshold (
const float threshold)
150 color_gradient_mod_.setGradientMagnitudeThreshold (threshold);
161 setIntersectionVolumeThreshold (
const float threshold = 1.0f)
163 intersection_volume_threshold_ = threshold;
174 surface_normal_mod_.setInputCloud (cloud);
175 surface_normal_mod_.processInputData ();
186 color_gradient_mod_.setInputCloud (cloud);
187 color_gradient_mod_.processInputData ();
198 createAndAddTemplate (
200 const size_t object_id,
217 float min_scale = 0.6944444f,
218 float max_scale = 1.44f,
219 float scale_multiplier = 1.2f);
228 computeTransformedTemplatePoints (
const size_t detection_id,
235 inline std::vector<size_t>
236 findObjectPointIndices (
const size_t detection_id)
238 if (detection_id >= detections_.size ())
239 PCL_ERROR (
"ERROR pcl::LineRGBD::computeTransformedTemplatePoints - detection_id is out of bounds\n");
243 std::vector<size_t> vec;
254 inline std::vector<size_t>
255 alignTemplatePoints (
const size_t detection_id)
257 if (detection_id >= detections_.size ())
258 PCL_ERROR (
"ERROR pcl::LineRGBD::computeTransformedTemplatePoints - detection_id is out of bounds\n");
262 std::vector<size_t> vec;
268 refineDetectionsAlongDepth ();
272 applyProjectiveDepthICPOnDetections ();
276 removeOverlappingDetections ();
291 float intersection_volume_threshold_;
313 std::vector<typename pcl::LineRGBD<PointXYZT, PointRGBT>::Detection>
detections_;
318 #include <pcl/recognition/impl/linemod/line_rgbd.hpp>