| 192 | |
| 193 | |
| 194 | void Pointcloud::minDist(double thres) { |
| 195 | Pointcloud result; |
| 196 | |
| 197 | float x,y,z; |
| 198 | for (Pointcloud::const_iterator it=begin(); it!=end(); it++) { |
| 199 | x = (*it)(0); |
| 200 | y = (*it)(1); |
| 201 | z = (*it)(2); |
| 202 | double dist = sqrt(x*x+y*y+z*z); |
| 203 | if ( dist > thres ) result.push_back (x,y,z); |
| 204 | } // end for points |
| 205 | this->clear(); |
| 206 | this->push_back(result); |
| 207 | } |
| 208 | |
| 209 | |
| 210 | void Pointcloud::subSampleRandom(unsigned int num_samples, Pointcloud& sample_cloud) { |