Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to load LiDAR point cloud data from a file.
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
Using image or video file names instead of point cloud files.
Forgetting to put the filename in quotes.
✗ Incorrect
LiDAR point cloud data is often stored in .las files. The function read_point_cloud loads this data.
2fill in blank
mediumComplete the code to visualize the loaded LiDAR point cloud.
Computer Vision
import open3d as o3d pcd = o3d.io.read_point_cloud("data.las") o3d.visualization.[1]([pcd])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect visualization function names.
Forgetting to import the visualization module.
✗ Incorrect
The function draw_geometries is used in Open3D to visualize point clouds.
3fill in blank
hardFix the error in the code to compute the normals of the point cloud.
Computer Vision
pcd = o3d.io.read_point_cloud("data.las") 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 or incorrect class names.
Misspelling the class name.
✗ Incorrect
The correct class name is KDTreeSearchParamRadius.
4fill in blank
hardFill both blanks to create a voxel grid downsampling of the point cloud.
Computer Vision
pcd = o3d.io.read_point_cloud("data.las") downsampled_pcd = pcd.[1](voxel_size=[2])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong method names like 'downsample'.
Passing voxel size as a string instead of a float.
✗ Incorrect
The method voxel_down_sample downsamples the point cloud using the given voxel size.
5fill in blank
hardFill all three blanks to filter points based on height (z coordinate) in the point cloud.
Computer Vision
points = np.asarray(pcd.points) filtered_points = points[points[:, [1]] [2] [3]] filtered_pcd = o3d.geometry.PointCloud() filtered_pcd.points = o3d.utility.Vector3dVector(filtered_points)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong coordinate index for z.
Using wrong comparison operator.
Using a string instead of a number for height.
✗ Incorrect
The z coordinate is at index 2, filtering points where z > 1.5.