hi I Check this code
opencv32\opencv_contrib\modules\sfm\src\simple_pipeline.cpp
and i found faster code. -> libmv_reconstruction_.reconstruction.AllPoints()[i].X[j]
should
libmv:: vector<euclideanpoint> Points = libmv_reconstruction_.reconstruction.AllPoints(); and change to Points [i].X[j]
getPoints(OutputArray points3d) { const size_t n_points = libmv_reconstruction_.reconstruction.AllPoints().size();
points3d.create(n_points, 1, CV_64F);
Vec3d point3d;
for ( size_t i = 0; i < n_points; ++i )
{
for ( int j = 0; j < 3; ++j )
point3d[j] =
libmv_reconstruction_.reconstruction.AllPoints()[i].X[j];
Mat(point3d).copyTo(points3d.getMatRef(i));
}
}
getPoints(OutputArray points3d) { libmv:: vector<euclideanpoint> points = libmv_reconstruction_.reconstruction.AllPoints(); const size_t n_points = points.size(); points3d.create(n_points, 1, CV_64F);
Vec3d point3d;
for ( size_t i = 0; i < n_points; ++i )
{
for ( int j = 0; j < 3; ++j )
point3d[j] =
points[i].X[j];
Mat(point3d).copyTo(points3d.getMatRef(i));
}
}
thanks