| 101 | } |
| 102 | |
| 103 | void |
| 104 | compute (const CloudT::Ptr &input, std::vector<FeatureT, Eigen::aligned_allocator<FeatureT> > &output, |
| 105 | unsigned int k, |
| 106 | float normal_radius_search, |
| 107 | float fpfh_radius_search, |
| 108 | bool label) |
| 109 | { |
| 110 | TicToc tt; |
| 111 | tt.tic (); |
| 112 | |
| 113 | print_highlight ("Computing "); |
| 114 | |
| 115 | UnaryClassifier<PointT> classifier; |
| 116 | classifier.setInputCloud (input); |
| 117 | classifier.setClusterSize (k); |
| 118 | classifier.setNormalRadiusSearch (normal_radius_search); |
| 119 | classifier.setFPFHRadiusSearch (fpfh_radius_search); |
| 120 | classifier.setLabelField (label); |
| 121 | |
| 122 | FeatureT::Ptr feature (new FeatureT); |
| 123 | classifier.train (feature); |
| 124 | output.push_back (*feature); |
| 125 | |
| 126 | print_info ("[done, "); |
| 127 | print_value ("%g", tt.toc ()); |
| 128 | print_info (" ms : "); print_value ("%d", feature->width * feature->height); |
| 129 | print_info (" features]\n"); |
| 130 | } |
| 131 | |
| 132 | void |
| 133 | compute (const CloudLT::Ptr &input, std::vector<FeatureT, Eigen::aligned_allocator<FeatureT> > &output, |
no test coverage detected