Add files using upload-large-folder tool
Browse files- gt_check.py +31 -0
gt_check.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
import numpy as np
|
| 3 |
+
import open3d as o3d
|
| 4 |
+
|
| 5 |
+
with open("./gt_noisyfiltered/eyeglasses/noisy_filtered_100_1.json", 'r') as f:
|
| 6 |
+
loaded_data = json.load(f)
|
| 7 |
+
|
| 8 |
+
noisy_data = loaded_data['noisy_filtered_100_1']
|
| 9 |
+
T_matrix = noisy_data['matrix_world']
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
##Translated
|
| 13 |
+
|
| 14 |
+
gt_path = "./gt_filtered/glasses/gt_filtered.ply"
|
| 15 |
+
noisy_path = "./processed/eyeglasses/preprocessed_noisy_filtered/noisy_filtered_100_1.ply"
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
gt_pcd = o3d.io.read_point_cloud(gt_path)
|
| 19 |
+
gt_pcd.paint_uniform_color([0,0,1])
|
| 20 |
+
noisy_pcd = o3d.io.read_point_cloud(noisy_path)
|
| 21 |
+
noisy_pcd.paint_uniform_color([1,0,0])
|
| 22 |
+
|
| 23 |
+
## move and check gt and noisy
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
noisy_pcd.transform(T_matrix)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
o3d.visualization.draw_geometries([gt_pcd,noisy_pcd])
|