You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using open3d-cpp to process some pointclouds. However, the raw input is a float array (say float pts[3000], containing 1000 points), and I didn't find an efficient way to transform it into an open3d::geometry::Pointcloud, as the only parameterized constructor of Pointcloud is a copy constructor and only takes std::vector<Eigen::Vector3d> as input.
I made a naive converter, but I think it is not quite efficient, the first step is casting the float array (farr of size 40000*3) into a double array (darr), then do the following:
It turned out taking me 3-4ms, and because std::vector(T *start, T *end) is also a copy constructor, this code does 3 times of memory copy (all three addressed are different), which is not optimal.
Is there any more efficient way to create Pointcloud directly from memory?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using open3d-cpp to process some pointclouds. However, the raw input is a float array (say
float pts[3000]
, containing 1000 points), and I didn't find an efficient way to transform it into anopen3d::geometry::Pointcloud
, as the only parameterized constructor ofPointcloud
is a copy constructor and only takesstd::vector<Eigen::Vector3d>
as input.I made a naive converter, but I think it is not quite efficient, the first step is casting the float array (
farr
of size40000*3
) into a double array (darr
), then do the following:It turned out taking me 3-4ms, and because
std::vector(T *start, T *end)
is also a copy constructor, this code does 3 times of memory copy (all three addressed are different), which is not optimal.Is there any more efficient way to create Pointcloud directly from memory?
Beta Was this translation helpful? Give feedback.
All reactions