update preprocessor
This commit is contained in:
@@ -20,6 +20,8 @@ class PtsUtil:
|
||||
@staticmethod
|
||||
def random_downsample_point_cloud(point_cloud, num_points, require_idx=False):
|
||||
if point_cloud.shape[0] == 0:
|
||||
if require_idx:
|
||||
return point_cloud, np.array([])
|
||||
return point_cloud
|
||||
idx = np.random.choice(len(point_cloud), num_points, replace=True)
|
||||
if require_idx:
|
||||
@@ -60,7 +62,11 @@ class PtsUtil:
|
||||
cos_theta = np.dot(normals_normalized, camera_axis)
|
||||
theta_rad = np.deg2rad(theta)
|
||||
idx = cos_theta > np.cos(theta_rad)
|
||||
print(cos_theta, theta_rad)
|
||||
filtered_points= points[idx]
|
||||
# ------ Debug Start ------
|
||||
import ipdb;ipdb.set_trace()
|
||||
# ------ Debug End ------
|
||||
if require_idx:
|
||||
return filtered_points, idx
|
||||
return filtered_points
|
Reference in New Issue
Block a user