Closed FelipeDelgadoR closed 2 years ago
Consider the scale of your point cloud - 0.04 voxel downsampling and normal estimation is all related to the scale of the input point cloud. The example code assumes point set is in metric scale (1 means 1m).
One thing that I've just realized is that the point cloud that I'm using has no color information! I didn't noticed at first because I got a "complete point cloud" with color information, and then I crop the point cloud and I was "allegedly" saving the color and normals information from the point cloud, but I've just realized that I'm actually not saving this information, my script looks like this:
`points = np.asarray(point_cloud.points) # Converts the point cloud information into an array
indices_to_keep = [] # Creates array of the points that we need
for i, p in enumerate(points):
d = np.sum((p - center) ** 2) # Distance between the point and the center
if d < radius ** 2: # If the point it's inside the radius...
indices_to_keep.append(i) # ... keep it
# Keep the listed indices
point_cloud.points = o3d.utility.Vector3dVector(points[indices_to_keep, :])
if point_cloud.has_colors():
point_cloud.colors = o3d.utility.Vector3dVector(np.asarray(point_cloud.colors)[indices_to_keep, :])
if point_cloud.has_normals():
point_cloud.normals = o3d.utility.Vector3dVector(np.asarray(point_cloud.normals)[indices_to_keep, :])`
but the function has_colors and has_normals always returns False for some reason... any idea on how to do this?
has_colors
and has_normals
assert that they are of the same length as the points. In your case you have changed points
in-place, so they are inconsistent with the colors and normals, resulting in False
. I would recommend constructing new point cloud instead of modifying in-place.
Hello everyone, I'm trying to execute the colored icp registration example with Open3D 0.8.0 The only thing that has changed is the source and target point clouds but right after the script is over I get this
I'm wondering if the voxel size is something that I have to change, but I've been trying with a lot of values with no results...
Thanks in advance!