0
0
Computer Visionml~10 mins

Point cloud processing in Computer Vision - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete 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'
Apointcloud
B"pointcloud.ply"
Cread_point_cloud
Do3d
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put the filename in quotes.
Passing the function name instead of a filename.
2fill in blank
medium

Complete 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'
Avoxel_size
B5
C0.05
D"0.05"
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the voxel size as a string instead of a float.
Using an integer instead of a float.
3fill in blank
hard

Fix 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'
ARadius
Bradius
Cradius_size
DRadiusSearch
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase 'r' in 'radius' causing attribute error.
Using a wrong class name like 'RadiusSearch'.
4fill in blank
hard

Fill 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'
Apoints
Bpcd
Cnp.array
Dpoints.T
Attempts:
3 left
💡 Hint
Common Mistakes
Passing raw numpy array directly without wrapping.
Passing points instead of pcd to draw_geometries.
5fill in blank
hard

Fill 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'
Aget_axis_aligned_bounding_box
Bmin_bound
Cmax_bound
Dget_bounding_box
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong method name like get_bounding_box.
Confusing min_bound and max_bound attribute names.