Spaces:
Sleeping
Sleeping
feat: Add rotation for gs
Browse files
app.py
CHANGED
@@ -220,6 +220,12 @@ def reconstruct(video_path, conf_thresh, kf_every,
|
|
220 |
print("Performing global registration...")
|
221 |
transformed_pcds, _, _ = improved_multiway_registration(pcds, voxel_size=0.01)
|
222 |
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
# Create coarse result
|
224 |
refined_output_path = tempfile.mktemp(suffix='.ply')
|
225 |
point2gs(refined_output_path, transformed_pcds)
|
|
|
220 |
print("Performing global registration...")
|
221 |
transformed_pcds, _, _ = improved_multiway_registration(pcds, voxel_size=0.01)
|
222 |
|
223 |
+
# Apply rotation
|
224 |
+
rot = np.eye(4)
|
225 |
+
rot[:3, :3] = Rotation.from_euler('y', np.deg2rad(180)).as_matrix()
|
226 |
+
transform = np.linalg.inv(OPENGL @ rot)
|
227 |
+
transformed_pcds.transform(transform)
|
228 |
+
|
229 |
# Create coarse result
|
230 |
refined_output_path = tempfile.mktemp(suffix='.ply')
|
231 |
point2gs(refined_output_path, transformed_pcds)
|