Hello,
I have been really enjoying your library. I haven't been able to find a way to convert a numpy array to a point cloud. I was wondering if there is any way to do that or do I have to save my numpy array as ply file?
Thank you!
For the quick answer, please refer src\Python\Tutorial\Misc\vector.py.
There are several examples how to make an instance of Vector3dVector that is compatible with py3d.PointCloud.points.
For meshes, py3d.TriangleMesh.triangles can take Vector3iVector. py3d.TriangleMesh.points takes Vector3dVector.
Enjoy Open3D!
Hi,
I have two 3D numpy array (np_array1 of sizes 157, 216, 201 and np_array2 of size 156, 176, 161). In each of them just some voxels are 1 (showing the segmented parts out of an image) and others are 0.
I wanted to ICP register the segmented parts of these two volumes using Open3D.
I did these steps:
1- tried to convert them to point clouds like this:
point_cloud1 = o3d.PointCloud()
point_cloud1.points = o3d.Vector3dVector(np.argwhere(np_array1==1.0))
and like that for point_cloud2
2- I call the registration evaluation using an eye transformation and I get inlier_rmse=0.0000000:
trans_init = = np.eye(4)
evaluation = o3d.registration.evaluate_registration(point_cloud1, point_cloud2, threshold, trans_init)
is it ok to get rmse=0.000000000?
as when I run the registration_icp, nothing will change in each of point clouds.
do you think that there is kind of wrong thing is going on in converting volume labels to point clouds in my code?
any help would be appreciated,
thanks in advance
Saeed
What's your inlier ratio?
In your case, your points are points of the center of voxels. So if two voxels align, they are identified as an inlier correspondence, thus produce rmse=0. This is legit.
However, I do think in your use case, you probably want to play with the threshold a bit.
Another idea is to plot the two point clouds out and visually inspect them.
I attach a photo of my two point clouds:

As it is obvious some outliers are visible here and the two point clouds are not registered.
about the threshold any ideas still?
Best Regards,
Saeed
It's hard to see from this angle? Can you share the files with us?
Most helpful comment
For the quick answer, please refer
src\Python\Tutorial\Misc\vector.py.There are several examples how to make an instance of
Vector3dVectorthat is compatible withpy3d.PointCloud.points.For meshes,
py3d.TriangleMesh.trianglescan takeVector3iVector.py3d.TriangleMesh.pointstakesVector3dVector.Enjoy Open3D!