MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / loadTrainedFeatures

Function loadTrainedFeatures

tools/unary_classifier_segment.cpp:77–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77bool
78loadTrainedFeatures (std::vector<FeatureT::Ptr> &out,
79 const pcl_fs::path &base_dir)
80{
81 if (!pcl_fs::exists (base_dir) && !pcl_fs::is_directory (base_dir))
82 return false;
83
84 for (pcl_fs::directory_iterator it (base_dir); it != pcl_fs::directory_iterator (); ++it)
85 {
86 if (!pcl_fs::is_directory (it->status ()) &&
87 it->path ().extension ().string () == ".pcd")
88 {
89 const std::string path = it->path ().string ();
90
91 print_highlight ("Loading %s \n", path.c_str ());
92
93 FeatureT::Ptr features (new FeatureT);
94 if (loadPCDFile (path, *features) < 0)
95 return false;
96
97 out.push_back (features);
98 }
99 }
100 return true;
101}
102
103bool
104loadCloud (const std::string &filename, CloudT::Ptr &cloud)

Callers 1

mainFunction · 0.85

Calls 2

loadPCDFileFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected