File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2471,6 +2471,9 @@ class op_normal_estimate : public voxel_operation {
24712471
24722472 Eigen::MatrixXf points = Eigen::Map<Eigen::MatrixXf>(coords.data (), 3 , coords.size () / 3 ).transpose ();
24732473
2474+ // Eigen::RowVector3f it_as_vec((*it).get(0), (*it).get(1), (*it).get(2));
2475+ // Eigen::MatrixXf centered = points.rowwise() - it_as_vec;
2476+
24742477 Eigen::MatrixXf centered = points.rowwise () - points.colwise ().mean ();
24752478 Eigen::MatrixXf cov = centered.adjoint () * centered;
24762479 Eigen::SelfAdjointEigenSolver<Eigen::MatrixXf> eig (cov);
Original file line number Diff line number Diff line change 6464 uint32_t v;
6565 $self->Get (ijk, &v);
6666 return PyLong_FromLong (v);
67+ } else if ($self->value_bits () == sizeof (normal_and_curvature<int16_t >) * 8 ) {
68+ normal_and_curvature_t ::storage_type v;
69+ $self->Get (ijk, &v);
70+ if (!v) {
71+ return SWIG_Py_Void ();
72+ } else {
73+ auto vf = v.convert <float >();
74+ auto tup = PyTuple_New (4 );
75+ for (size_t i = 0 ; i < 4 ; ++i) {
76+ PyTuple_SetItem (tup, i, PyFloat_FromDouble (vf.nxyz_curv [i]));
77+ }
78+ return tup;
79+ }
6780 } else {
6881 throw std::runtime_error (" Unsupported" );
6982 }
You can’t perform that action at this time.
0 commit comments