Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to load a point cloud file using Open3D.
Computer Vision
import open3d as o3d pcd = o3d.io.read_point_cloud([1]) print(pcd)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put the filename in quotes.
Passing the function name instead of a filename.
✗ Incorrect
The read_point_cloud function requires the filename as a string to load the point cloud data.
2fill in blank
mediumComplete the code to downsample a point cloud using voxel grid filtering.
Computer Vision
downsampled_pcd = pcd.voxel_down_sample([1]) print(downsampled_pcd)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the voxel size as a string instead of a float.
Using an integer instead of a float.
✗ Incorrect
The voxel_down_sample method expects a float representing the voxel size, such as 0.05.
3fill in blank
hardFix the error in the code to estimate normals for the point cloud.
Computer Vision
pcd.estimate_normals(search_param=o3d.geometry.KDTreeSearchParam[1](radius=0.1, max_nn=30))
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase 'r' in 'radius' causing attribute error.
Using a wrong class name like 'RadiusSearch'.
✗ Incorrect
The correct class name is KDTreeSearchParamRadius with uppercase 'R' in 'Radius'.
4fill in blank
hardFill both blanks to create a point cloud from numpy array and visualize it.
Computer Vision
import numpy as np import open3d as o3d points = np.random.rand(100, 3) pcd = o3d.geometry.PointCloud() pcd.points = o3d.utility.Vector3dVector([1]) o3d.visualization.draw_geometries([[2]])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing raw numpy array directly without wrapping.
Passing points instead of pcd to draw_geometries.
✗ Incorrect
The points attribute expects a Vector3dVector wrapping the numpy points array, and draw_geometries needs the point cloud object.
5fill in blank
hardFill all three blanks to compute and print the axis-aligned bounding box of a point cloud.
Computer Vision
aabb = pcd.[1]() min_bound = aabb.[2] max_bound = aabb.[3] print(f"Min bound: {min_bound}, Max bound: {max_bound}")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong method name like get_bounding_box.
Confusing min_bound and max_bound attribute names.
✗ Incorrect
The method to get the bounding box is get_axis_aligned_bounding_box, and the bounding box has min_bound and max_bound attributes.