update gf_view_finder
This commit is contained in:
@@ -184,11 +184,11 @@ class PoseUtil:
|
||||
], f"the rotation mode {rot_mode} is not supported!"
|
||||
|
||||
if rot_mode == "quat_wxyz" or rot_mode == "quat_xyzw":
|
||||
pose_dim = 4
|
||||
pose_dim = 7
|
||||
elif rot_mode == "euler_xyz":
|
||||
pose_dim = 3
|
||||
elif rot_mode == "euler_xyz_sx_cx" or rot_mode == "rot_matrix":
|
||||
pose_dim = 6
|
||||
elif rot_mode == "euler_xyz_sx_cx" or rot_mode == "rot_matrix":
|
||||
pose_dim = 9
|
||||
else:
|
||||
raise NotImplementedError
|
||||
return pose_dim
|
||||
|
@@ -45,12 +45,12 @@ class ReconstructionUtil:
|
||||
|
||||
|
||||
@staticmethod
|
||||
def compute_next_best_view_sequence_with_overlap(target_point_cloud, point_cloud_list, threshold=0.01, overlap_threshold=0.3):
|
||||
def compute_next_best_view_sequence_with_overlap(target_point_cloud, point_cloud_list, threshold=0.01, overlap_threshold=0.3, status_info=None):
|
||||
selected_views = []
|
||||
current_coverage = 0.0
|
||||
remaining_views = list(range(len(point_cloud_list)))
|
||||
view_sequence = []
|
||||
|
||||
cnt_processed_view = 0
|
||||
while remaining_views:
|
||||
best_view = None
|
||||
best_coverage_increase = -1
|
||||
@@ -74,6 +74,14 @@ class ReconstructionUtil:
|
||||
if coverage_increase > best_coverage_increase:
|
||||
best_coverage_increase = coverage_increase
|
||||
best_view = view_index
|
||||
cnt_processed_view += 1
|
||||
if status_info is not None:
|
||||
|
||||
sm = status_info["status_manager"]
|
||||
app_name = status_info["app_name"]
|
||||
runner_name = status_info["runner_name"]
|
||||
sm.set_status(app_name, runner_name, "current coverage", current_coverage)
|
||||
sm.set_progress(app_name, runner_name, "processed view", cnt_processed_view, len(point_cloud_list))
|
||||
|
||||
if best_view is not None:
|
||||
if best_coverage_increase <=1e-3:
|
||||
@@ -87,7 +95,11 @@ class ReconstructionUtil:
|
||||
|
||||
else:
|
||||
break
|
||||
|
||||
if status_info is not None:
|
||||
sm = status_info["status_manager"]
|
||||
app_name = status_info["app_name"]
|
||||
runner_name = status_info["runner_name"]
|
||||
sm.set_progress(app_name, runner_name, "processed view", len(point_cloud_list), len(point_cloud_list))
|
||||
return view_sequence, remaining_views
|
||||
|
||||
|
Reference in New Issue
Block a user