| 108 | } |
| 109 | |
| 110 | Line3d PointAccumulator::getBestLine() const |
| 111 | { |
| 112 | Vector3d centroid; |
| 113 | Matrix3d eigenvectors; |
| 114 | Vector3d eigenvalues; |
| 115 | if ( !getCenteredCovarianceEigen( centroid, eigenvectors, eigenvalues ) ) |
| 116 | return {}; |
| 117 | |
| 118 | return { centroid, eigenvectors.z }; |
| 119 | } |
| 120 | |
| 121 | void accumulatePoints( PointAccumulator& accum, const std::vector<Vector3f>& points, const AffineXf3f* xf ) |
| 122 | { |