Datasets:

Modalities:
Image
Video
Languages:
English
Size:
< 1K
ArXiv:
Libraries:
Datasets
License:
lemonaddie commited on
Commit
a50a70d
1 Parent(s): e79f607

Upload 6 files

Browse files
load_dataset.py CHANGED
@@ -30,6 +30,7 @@ from utils import *
30
  # 1. Load scenes infomation
31
  # --------------------------------------------------------------------------
32
  dataset_root = 'root_path/360Motion-Dataset'
 
33
  video_names = []
34
  scenes = ['Desert', 'HDRI']
35
  scene_location_pair = {
@@ -44,7 +45,7 @@ scene_location_pair = {
44
  }
45
  }
46
  for scene in scenes:
47
- video_path = os.path.join(dataset_root, scene)
48
  locations_path = os.path.join(video_path, "location_data.json")
49
  with open(locations_path, 'r') as f: locations = json.load(f)
50
  locations_info = {locations[idx]['name']:locations[idx] for idx in range(len(locations))}
@@ -54,7 +55,7 @@ for scene in scenes:
54
  location = scene_location_pair[scene]
55
  else:
56
  location = scene_location_pair['HDRI'][video_name.split('_')[1]]
57
- video_names.append((scene, video_name, location, locations_info))
58
 
59
  # --------------------------------------------------------------------------
60
  # 2. Load 12 surrounding cameras
@@ -81,9 +82,9 @@ sample_n_frames = 49
81
  # --------------------------------------------------------------------------
82
  # 3. Load a sample of video & object poses
83
  # --------------------------------------------------------------------------
84
- (scene, video_name, location, locations_info) = video_names[20]
85
 
86
- with open(os.path.join(dataset_root, scene, video_name, video_name+'.json'), 'r') as f: objs_file = json.load(f)
87
  objs_num = len(objs_file['0'])
88
  video_index = random.randint(1, cam_num-1)
89
 
@@ -131,7 +132,7 @@ start_frame_ind = random.randint(10, max(10, total_frames - cropped_length - 1))
131
  end_frame_ind = min(start_frame_ind + cropped_length, total_frames)
132
  frame_indices = np.linspace(start_frame_ind, end_frame_ind - 1, sample_n_frames, dtype=int)
133
 
134
- video_frames_path = os.path.join(dataset_root, scene, video_name, 'videos', video_name+ f'_C_{video_index:02d}_35mm.mp4')
135
  cap = cv2.VideoCapture(video_frames_path)
136
  height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
137
  width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
 
30
  # 1. Load scenes infomation
31
  # --------------------------------------------------------------------------
32
  dataset_root = 'root_path/360Motion-Dataset'
33
+ video_res = '480_720'
34
  video_names = []
35
  scenes = ['Desert', 'HDRI']
36
  scene_location_pair = {
 
45
  }
46
  }
47
  for scene in scenes:
48
+ video_path = os.path.join(dataset_root, video_res, scene)
49
  locations_path = os.path.join(video_path, "location_data.json")
50
  with open(locations_path, 'r') as f: locations = json.load(f)
51
  locations_info = {locations[idx]['name']:locations[idx] for idx in range(len(locations))}
 
55
  location = scene_location_pair[scene]
56
  else:
57
  location = scene_location_pair['HDRI'][video_name.split('_')[1]]
58
+ video_names.append((video_res, scene, video_name, location, locations_info))
59
 
60
  # --------------------------------------------------------------------------
61
  # 2. Load 12 surrounding cameras
 
82
  # --------------------------------------------------------------------------
83
  # 3. Load a sample of video & object poses
84
  # --------------------------------------------------------------------------
85
+ (video_res, scene, video_name, location, locations_info) = video_names[20]
86
 
87
+ with open(os.path.join(dataset_root, video_res, scene, video_name, video_name+'.json'), 'r') as f: objs_file = json.load(f)
88
  objs_num = len(objs_file['0'])
89
  video_index = random.randint(1, cam_num-1)
90
 
 
132
  end_frame_ind = min(start_frame_ind + cropped_length, total_frames)
133
  frame_indices = np.linspace(start_frame_ind, end_frame_ind - 1, sample_n_frames, dtype=int)
134
 
135
+ video_frames_path = os.path.join(dataset_root, video_res, scene, video_name, 'videos', video_name+ f'_C_{video_index:02d}_35mm.mp4')
136
  cap = cv2.VideoCapture(video_frames_path)
137
  height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
138
  width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
traj_vis/D_loc1_61_t3n13_003d_Hemi12_1.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"0":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.8 -22935.3 147.103 1] "},{"index":141,"matrix":"[-0.613263 -0.789878 0 0] [0.789878 -0.613263 -0 0] [0 0 1 0] [18849.5 -22481.6 147.103 1] "},{"index":2,"matrix":"[0.951994 0.306116 0 0] [-0.306116 0.951994 0 0] [0 -0 1 0] [19030.7 -22801.6 147.103 1] "}],"1":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.8 -22931.3 147.103 1] "},{"index":141,"matrix":"[-0.341759 -0.939788 0 0] [0.939788 -0.341759 -0 0] [0 0 1 0] [18843.7 -22489 147.103 1] "},{"index":2,"matrix":"[0.777737 0.628589 0 0] [-0.628589 0.777737 0 0] [0 -0 1 0] [19037.2 -22799.5 147.103 1] "}],"2":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.7 -22927.4 147.103 1] "},{"index":141,"matrix":"[-0.317189 -0.948362 0 0] [0.948362 -0.317189 -0 0] [0 0 1 0] [18840.5 -22497.9 147.103 1] "},{"index":2,"matrix":"[0.734696 0.678396 0 0] [-0.678396 0.734696 0 0] [0 -0 1 0] [19042.5 -22795.2 147.103 1] "}],"3":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.7 -22923.5 147.103 1] "},{"index":141,"matrix":"[-0.304602 -0.95248 0 0] [0.95248 -0.304602 -0 0] [0 0 1 0] [18837.5 -22506.8 147.103 1] "},{"index":2,"matrix":"[0.717886 0.696161 0 0] [-0.696161 0.717886 0 0] [0 -0 1 0] [19047.5 -22790.6 147.103 1] "}],"4":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.7 -22919.6 147.103 1] "},{"index":141,"matrix":"[-0.291852 -0.956463 0 0] [0.956463 -0.291852 -0 0] [0 0 1 0] [18834.6 -22515.8 147.103 1] "},{"index":2,"matrix":"[0.703315 0.710879 0 0] [-0.710879 0.703315 0 0] [0 -0 1 0] [19052.4 -22785.8 147.103 1] "}],"5":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.7 -22915.7 147.103 1] "},{"index":141,"matrix":"[-0.278641 -0.960395 0 0] [0.960395 -0.278641 -0 0] [0 0 1 0] [18831.9 -22524.8 147.103 1] "},{"index":2,"matrix":"[0.688207 0.725515 0 0] [-0.725515 0.688207 0 0] [0 -0 1 0] [19057.2 -22781 147.103 1] "}],"6":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.7 -22911.7 147.103 1] "},{"index":141,"matrix":"[-0.264988 -0.964252 0 0] [0.964252 -0.264988 -0 0] [0 0 1 0] [18829.3 -22533.8 147.103 1] "},{"index":2,"matrix":"[0.672214 0.740357 0 0] [-0.740357 0.672214 0 0] [0 -0 1 0] [19061.9 -22776.1 147.103 1] "}],"7":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.6 -22907.8 147.103 1] "},{"index":141,"matrix":"[-0.250908 -0.968011 0 0] [0.968011 -0.250908 -0 0] [0 0 1 0] [18826.8 -22542.9 147.103 1] "},{"index":2,"matrix":"[0.655244 0.755417 0 0] [-0.755417 0.655244 0 0] [0 -0 1 0] [19066.4 -22771 147.103 1] "}],"8":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.6 -22903.9 147.103 1] "},{"index":141,"matrix":"[-0.23641 -0.971653 0 0] [0.971653 -0.23641 -0 0] [0 0 1 0] [18824.4 -22552 147.103 1] "},{"index":2,"matrix":"[0.637232 0.770672 0 0] [-0.770672 0.637232 0 0] [0 -0 1 0] [19070.9 -22765.9 147.103 1] "}],"9":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.6 -22900 147.103 1] "},{"index":141,"matrix":"[-0.221488 -0.975163 0 0] [0.975163 -0.221488 -0 0] [0 0 1 0] [18822.2 -22561.1 147.103 1] "},{"index":2,"matrix":"[0.618071 0.786122 0 0] [-0.786122 0.618071 0 0] [0 -0 1 0] [19075.2 -22760.7 147.103 1] "}],"10":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.6 -22896.1 147.103 1] "},{"index":141,"matrix":"[-0.206134 -0.978524 0 0] [0.978524 -0.206134 -0 0] [0 0 1 0] [18820.1 -22570.3 147.103 1] "},{"index":2,"matrix":"[0.597642 0.801763 0 0] [-0.801763 0.597642 0 0] [0 -0 1 0] [19079.4 -22755.3 147.103 1] "}],"11":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.5 -22892.1 147.103 1] "},{"index":141,"matrix":"[-0.190335 -0.981719 0 0] [0.981719 -0.190335 -0 0] [0 0 1 0] [18818.2 -22579.5 147.103 1] "},{"index":2,"matrix":"[0.575785 0.817601 0 0] [-0.817601 0.575785 0 0] [0 -0 1 0] [19083.5 -22749.9 147.103 1] "}],"12":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.5 -22888.2 147.103 1] "},{"index":141,"matrix":"[-0.174056 -0.984736 0 0] [0.984736 -0.174056 -0 0] [0 0 1 0] [18816.4 -22588.7 147.103 1] "},{"index":2,"matrix":"[0.552297 0.833647 0 0] [-0.833647 0.552297 0 0] [0 -0 1 0] [19087.4 -22744.3 147.103 1] "}],"13":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.5 -22884.3 147.103 1] "},{"index":141,"matrix":"[-0.157284 -0.987553 0 0] [0.987553 -0.157284 -0 0] [0 0 1 0] [18814.7 -22598 147.103 1] "},{"index":2,"matrix":"[0.526901 0.849927 0 0] [-0.849927 0.526901 0 0] [0 -0 1 0] [19091.2 -22738.6 147.103 1] "}],"14":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.5 -22880.4 147.103 1] "},{"index":141,"matrix":"[-0.139988 -0.990153 0 0] [0.990153 -0.139988 -0 0] [0 0 1 0] [18813.3 -22607.3 147.103 1] "},{"index":2,"matrix":"[0.499271 0.866446 0 0] [-0.866446 0.499271 0 0] [0 -0 1 0] [19094.8 -22732.8 147.103 1] "}],"15":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.5 -22876.5 147.103 1] "},{"index":141,"matrix":"[-0.122116 -0.992516 0 0] [0.992516 -0.122116 -0 0] [0 0 1 0] [18811.9 -22616.6 147.103 1] "},{"index":2,"matrix":"[0.468991 0.883203 0 0] [-0.883203 0.468991 0 0] [0 -0 1 0] [19098.2 -22726.9 147.103 1] "}],"16":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.4 -22872.5 147.103 1] "},{"index":141,"matrix":"[-0.103621 -0.994617 0 0] [0.994617 -0.103621 -0 0] [0 0 1 0] [18810.8 -22625.9 147.103 1] "},{"index":2,"matrix":"[0.435515 0.900182 0 0] [-0.900182 0.435515 0 0] [0 -0 1 0] [19101.4 -22720.9 147.103 1] "}],"17":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.4 -22868.6 147.103 1] "},{"index":141,"matrix":"[-0.0844501 -0.996428 0 0] [0.996428 -0.0844501 -0 0] [0 0 1 0] [18809.8 -22635.3 147.103 1] "},{"index":2,"matrix":"[0.398234 0.917284 0 0] [-0.917284 0.398234 0 0] [0 -0 1 0] [19104.3 -22714.8 147.103 1] "}],"18":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.4 -22864.7 147.103 1] "},{"index":141,"matrix":"[-0.0645412 -0.997915 0 0] [0.997915 -0.0645412 -0 0] [0 0 1 0] [18809 -22644.7 147.103 1] "},{"index":2,"matrix":"[0.356564 0.934271 0 0] [-0.934271 0.356564 0 0] [0 -0 1 0] [19107 -22708.6 147.103 1] "}],"19":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.4 -22860.8 147.103 1] "},{"index":141,"matrix":"[-0.0438255 -0.999039 0 0] [0.999039 -0.0438255 -0 0] [0 0 1 0] [18808.4 -22654.1 147.103 1] "},{"index":2,"matrix":"[0.310051 0.95072 0 0] [-0.95072 0.310051 0 0] [0 -0 1 0] [19109.5 -22702.2 147.103 1] "}],"20":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.4 -22856.9 147.103 1] "},{"index":141,"matrix":"[-0.0222269 -0.999753 0 0] [0.999753 -0.0222269 -0 0] [0 0 1 0] [18808 -22663.4 147.103 1] "},{"index":2,"matrix":"[0.258735 0.965948 0 0] [-0.965948 0.258735 0 0] [0 -0 1 0] [19111.6 -22695.7 147.103 1] "}],"21":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.3 -22852.9 147.103 1] "},{"index":141,"matrix":"[0.00032029 -1 0 0] [1 0.00032029 -0 0] [0 0 1 0] [18807.8 -22672.9 147.103 1] "},{"index":2,"matrix":"[0.200412 0.979712 0 0] [-0.979712 0.200412 0 0] [0 -0 1 0] [19113.3 -22689.2 147.103 1] "}],"22":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.3 -22849 147.103 1] "},{"index":141,"matrix":"[0.0239348 -0.999714 0 0] [0.999714 0.0239348 -0 0] [0 0 1 0] [18807.8 -22682.3 147.103 1] "},{"index":2,"matrix":"[0.122083 0.99252 0 0] [-0.99252 0.122083 0 0] [0 -0 1 0] [19114.7 -22682.5 147.103 1] "}],"23":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.3 -22845.1 147.103 1] "},{"index":141,"matrix":"[0.0487004 -0.998813 0 0] [0.998813 0.0487004 -0 0] [0 0 1 0] [18808 -22691.7 147.103 1] "},{"index":2,"matrix":"[0.0327411 0.999464 0 0] [-0.999464 0.0327411 0 0] [0 -0 1 0] [19115.5 -22675.7 147.103 1] "}],"24":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.3 -22841.2 147.103 1] "},{"index":141,"matrix":"[0.0747293 -0.997204 0 0] [0.997204 0.0747293 -0 0] [0 0 1 0] [18808.5 -22701.1 147.103 1] "},{"index":2,"matrix":"[-0.0557011 0.998447 0 0] [-0.998447 -0.0557011 0 0] [0 -0 1 0] [19115.7 -22668.9 147.103 1] "}],"25":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.3 -22837.3 147.103 1] "},{"index":141,"matrix":"[0.102095 -0.994775 0 0] [0.994775 0.102095 -0 0] [0 0 1 0] [18809.2 -22710.4 147.103 1] "},{"index":2,"matrix":"[-0.13492 0.990856 0 0] [-0.990856 -0.13492 0 0] [0 -0 1 0] [19115.4 -22662.2 147.103 1] "}],"26":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.2 -22833.3 147.103 1] "},{"index":141,"matrix":"[0.13093 -0.991392 0 0] [0.991392 0.13093 -0 0] [0 0 1 0] [18810.2 -22719.8 147.103 1] "},{"index":2,"matrix":"[-0.202816 0.979217 0 0] [-0.979217 -0.202816 0 0] [0 -0 1 0] [19114.4 -22655.4 147.103 1] "}],"27":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.2 -22829.4 147.103 1] "},{"index":141,"matrix":"[0.161334 -0.9869 0 0] [0.9869 0.161334 -0 0] [0 0 1 0] [18811.4 -22729.1 147.103 1] "},{"index":2,"matrix":"[-0.261224 0.965278 0 0] [-0.965278 -0.261224 0 0] [0 -0 1 0] [19113.1 -22648.7 147.103 1] "}],"28":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.2 -22825.5 147.103 1] "},{"index":141,"matrix":"[0.193408 -0.981118 0 0] [0.981118 0.193408 -0 0] [0 0 1 0] [18812.9 -22738.4 147.103 1] "},{"index":2,"matrix":"[-0.312923 0.949779 0 0] [-0.949779 -0.312923 0 0] [0 -0 1 0] [19111.3 -22642.2 147.103 1] "}],"29":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.2 -22821.6 147.103 1] "},{"index":141,"matrix":"[0.227223 -0.973843 0 0] [0.973843 0.227223 -0 0] [0 0 1 0] [18814.7 -22747.6 147.103 1] "},{"index":2,"matrix":"[-0.360193 0.932878 0 0] [-0.932878 -0.360193 0 0] [0 -0 1 0] [19109.2 -22635.7 147.103 1] "}],"30":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.2 -22817.7 147.103 1] "},{"index":141,"matrix":"[0.262798 -0.964851 0 0] [0.964851 0.262798 -0 0] [0 0 1 0] [18816.9 -22756.8 147.103 1] "},{"index":2,"matrix":"[-0.404567 0.914508 0 0] [-0.914508 -0.404567 0 0] [0 -0 1 0] [19106.7 -22629.4 147.103 1] "}],"31":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.1 -22813.7 147.103 1] "},{"index":141,"matrix":"[0.300213 -0.953872 0 0] [0.953872 0.300213 -0 0] [0 0 1 0] [18819.3 -22765.9 147.103 1] "},{"index":2,"matrix":"[-0.447013 0.894527 0 0] [-0.894527 -0.447013 0 0] [0 -0 1 0] [19104 -22623.2 147.103 1] "}],"32":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.1 -22809.8 147.103 1] "},{"index":141,"matrix":"[0.339367 -0.940654 0 0] [0.940654 0.339367 -0 0] [0 0 1 0] [18822.2 -22774.9 147.103 1] "},{"index":2,"matrix":"[-0.488136 0.872768 0 0] [-0.872768 -0.488136 0 0] [0 -0 1 0] [19100.9 -22617.1 147.103 1] "}],"33":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.1 -22805.9 147.103 1] "},{"index":141,"matrix":"[0.380199 -0.924905 0 0] [0.924905 0.380199 -0 0] [0 0 1 0] [18825.3 -22783.7 147.103 1] "},{"index":2,"matrix":"[-0.52829 0.849064 0 0] [-0.849064 -0.52829 0 0] [0 -0 1 0] [19097.6 -22611.1 147.103 1] "}],"34":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999.1 -22802 147.103 1] "},{"index":141,"matrix":"[0.422527 -0.90635 0 0] [0.90635 0.422527 -0 0] [0 0 1 0] [18828.9 -22792.4 147.103 1] "},{"index":2,"matrix":"[-0.56771 0.823229 0 0] [-0.823229 -0.56771 0 0] [0 -0 1 0] [19094 -22605.3 147.103 1] "}],"35":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999 -22798.1 147.103 1] "},{"index":141,"matrix":"[0.466092 -0.884736 0 0] [0.884736 0.466092 -0 0] [0 0 1 0] [18832.9 -22800.9 147.103 1] "},{"index":2,"matrix":"[-0.606509 0.795076 0 0] [-0.795076 -0.606509 0 0] [0 -0 1 0] [19090.1 -22599.7 147.103 1] "}],"36":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999 -22794.1 147.103 1] "},{"index":141,"matrix":"[0.510543 -0.859852 0 0] [0.859852 0.510543 -0 0] [0 0 1 0] [18837.3 -22809.3 147.103 1] "},{"index":2,"matrix":"[-0.64471 0.764428 0 0] [-0.764428 -0.64471 0 0] [0 -0 1 0] [19086 -22594.3 147.103 1] "}],"37":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999 -22790.2 147.103 1] "},{"index":141,"matrix":"[0.55544 -0.831557 0 0] [0.831557 0.55544 -0 0] [0 0 1 0] [18842.1 -22817.3 147.103 1] "},{"index":2,"matrix":"[-0.682253 0.731116 0 0] [-0.731116 -0.682253 0 0] [0 -0 1 0] [19081.6 -22589.1 147.103 1] "}],"38":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999 -22786.3 147.103 1] "},{"index":141,"matrix":"[0.60026 -0.799805 0 0] [0.799805 0.60026 -0 0] [0 0 1 0] [18847.3 -22825.2 147.103 1] "},{"index":2,"matrix":"[-0.719002 0.695008 0 0] [-0.695008 -0.719002 0 0] [0 -0 1 0] [19077 -22584.2 147.103 1] "}],"39":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18999 -22782.4 147.103 1] "},{"index":141,"matrix":"[0.644427 -0.764665 0 0] [0.764665 0.644427 -0 0] [0 0 1 0] [18853 -22832.7 147.103 1] "},{"index":2,"matrix":"[-0.754745 0.656018 0 0] [-0.656018 -0.754745 0 0] [0 -0 1 0] [19072.1 -22579.4 147.103 1] "}],"40":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.9 -22778.5 147.103 1] "},{"index":141,"matrix":"[0.68732 -0.726355 0 0] [0.726355 0.68732 -0 0] [0 0 1 0] [18859 -22839.9 147.103 1] "},{"index":2,"matrix":"[-0.789206 0.614128 0 0] [-0.614128 -0.789206 0 0] [0 -0 1 0] [19066.9 -22575 147.103 1] "}],"41":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.9 -22774.5 147.103 1] "},{"index":141,"matrix":"[0.728345 -0.685211 0 0] [0.685211 0.728345 -0 0] [0 0 1 0] [18865.5 -22846.7 147.103 1] "},{"index":2,"matrix":"[-0.822049 0.569417 0 0] [-0.569417 -0.822049 0 0] [0 -0 1 0] [19061.6 -22570.8 147.103 1] "}],"42":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.9 -22770.6 147.103 1] "},{"index":141,"matrix":"[0.766948 -0.641709 0 0] [0.641709 0.766948 -0 0] [0 0 1 0] [18872.3 -22853.2 147.103 1] "},{"index":2,"matrix":"[-0.852907 0.522062 0 0] [-0.522062 -0.852907 0 0] [0 -0 1 0] [19056 -22566.9 147.103 1] "}],"43":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.9 -22766.7 147.103 1] "},{"index":141,"matrix":"[0.802643 -0.596459 0 0] [0.596459 0.802643 -0 0] [0 0 1 0] [18879.6 -22859.2 147.103 1] "},{"index":2,"matrix":"[-0.8814 0.472371 0 0] [-0.472371 -0.8814 0 0] [0 -0 1 0] [19050.2 -22563.4 147.103 1] "}],"44":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.9 -22762.8 147.103 1] "},{"index":141,"matrix":"[0.835163 -0.550002 0 0] [0.550002 0.835163 -0 0] [0 0 1 0] [18887.1 -22864.8 147.103 1] "},{"index":2,"matrix":"[-0.907165 0.420775 0 0] [-0.420775 -0.907165 0 0] [0 -0 1 0] [19044.2 -22560.2 147.103 1] "}],"45":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.8 -22758.9 147.103 1] "},{"index":141,"matrix":"[0.864292 -0.502991 0 0] [0.502991 0.864292 -0 0] [0 0 1 0] [18895 -22870 147.103 1] "},{"index":2,"matrix":"[-0.929899 0.367815 0 0] [-0.367815 -0.929899 0 0] [0 -0 1 0] [19038 -22557.3 147.103 1] "}],"46":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.8 -22754.9 147.103 1] "},{"index":141,"matrix":"[0.889922 -0.456113 0 0] [0.456113 0.889922 -0 0] [0 0 1 0] [18903.1 -22874.7 147.103 1] "},{"index":2,"matrix":"[-0.949391 0.314096 0 0] [-0.314096 -0.949391 0 0] [0 -0 1 0] [19031.7 -22554.8 147.103 1] "}],"47":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.8 -22751 147.103 1] "},{"index":141,"matrix":"[0.912239 -0.409659 0 0] [0.409659 0.912239 -0 0] [0 0 1 0] [18911.5 -22879 147.103 1] "},{"index":2,"matrix":"[-0.965524 0.260313 0 0] [-0.260313 -0.965524 0 0] [0 -0 1 0] [19025.2 -22552.6 147.103 1] "}],"48":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.8 -22747.1 147.103 1] "},{"index":141,"matrix":"[0.931546 -0.363624 0 0] [0.363624 0.931546 -0 0] [0 0 1 0] [18920 -22882.9 147.103 1] "},{"index":2,"matrix":"[-0.978323 0.207085 0 0] [-0.207085 -0.978323 0 0] [0 -0 1 0] [19018.7 -22550.9 147.103 1] "}],"49":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.8 -22743.2 147.103 1] "},{"index":141,"matrix":"[0.94818 -0.317734 0 0] [0.317734 0.94818 -0 0] [0 0 1 0] [18928.8 -22886.3 147.103 1] "},{"index":2,"matrix":"[-0.987885 0.155185 0 0] [-0.155185 -0.987885 0 0] [0 -0 1 0] [19012 -22549.5 147.103 1] "}],"50":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.7 -22739.3 147.103 1] "},{"index":141,"matrix":"[0.962364 -0.271763 0 0] [0.271763 0.962364 -0 0] [0 0 1 0] [18937.7 -22889.3 147.103 1] "},{"index":2,"matrix":"[-0.994528 0.104469 0 0] [-0.104469 -0.994528 0 0] [0 -0 1 0] [19005.3 -22548.4 147.103 1] "}],"51":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.7 -22735.3 147.103 1] "},{"index":141,"matrix":"[0.974232 -0.225548 0 0] [0.225548 0.974232 -0 0] [0 0 1 0] [18946.8 -22891.8 147.103 1] "},{"index":2,"matrix":"[-0.998523 0.0543235 0 0] [-0.0543235 -0.998523 0 0] [0 -0 1 0] [18998.5 -22547.7 147.103 1] "}],"52":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.7 -22731.4 147.103 1] "},{"index":141,"matrix":"[0.983864 -0.17892 0 0] [0.17892 0.983864 -0 0] [0 0 1 0] [18955.9 -22893.9 147.103 1] "},{"index":2,"matrix":"[-0.999991 0.00428697 0 0] [-0.00428697 -0.999991 0 0] [0 -0 1 0] [18991.7 -22547.3 147.103 1] "}],"53":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.7 -22727.5 147.103 1] "},{"index":141,"matrix":"[0.99128 -0.131775 0 0] [0.131775 0.99128 -0 0] [0 0 1 0] [18965.2 -22895.6 147.103 1] "},{"index":2,"matrix":"[-0.998943 -0.0459677 0 0] [0.0459677 -0.998943 -0 0] [0 0 1 0] [18984.9 -22547.3 147.103 1] "}],"54":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.7 -22723.6 147.103 1] "},{"index":141,"matrix":"[0.996469 -0.0839633 0 0] [0.0839633 0.996469 -0 0] [0 0 1 0] [18974.5 -22896.9 147.103 1] "},{"index":2,"matrix":"[-0.995314 -0.0966938 0 0] [0.0966938 -0.995314 -0 0] [0 0 1 0] [18978.1 -22547.6 147.103 1] "}],"55":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.6 -22719.7 147.103 1] "},{"index":141,"matrix":"[0.999369 -0.0355101 0 0] [0.0355101 0.999369 -0 0] [0 0 1 0] [18983.9 -22897.7 147.103 1] "},{"index":2,"matrix":"[-0.988976 -0.148073 0 0] [0.148073 -0.988976 -0 0] [0 0 1 0] [18971.3 -22548.3 147.103 1] "}],"56":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.6 -22715.7 147.103 1] "},{"index":141,"matrix":"[0.999908 0.0135796 0 0] [-0.0135796 0.999908 0 0] [0 -0 1 0] [18993.3 -22898 147.103 1] "},{"index":2,"matrix":"[-0.979751 -0.20022 0 0] [0.20022 -0.979751 -0 0] [0 0 1 0] [18964.6 -22549.3 147.103 1] "}],"57":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.6 -22711.8 147.103 1] "},{"index":141,"matrix":"[0.997998 0.063239 0 0] [-0.063239 0.997998 0 0] [0 -0 1 0] [19002.7 -22897.9 147.103 1] "},{"index":2,"matrix":"[-0.967418 -0.253185 0 0] [0.253185 -0.967418 -0 0] [0 0 1 0] [18958 -22550.6 147.103 1] "}],"58":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.6 -22707.9 147.103 1] "},{"index":141,"matrix":"[0.993556 0.113345 0 0] [-0.113345 0.993556 0 0] [0 -0 1 0] [19012.1 -22897.3 147.103 1] "},{"index":2,"matrix":"[-0.95174 -0.306905 0 0] [0.306905 -0.95174 -0 0] [0 0 1 0] [18951.4 -22552.4 147.103 1] "}],"59":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.5 -22704 147.103 1] "},{"index":141,"matrix":"[0.986506 0.163722 0 0] [-0.163722 0.986506 0 0] [0 -0 1 0] [19021.4 -22896.2 147.103 1] "},{"index":2,"matrix":"[-0.932457 -0.36128 0 0] [0.36128 -0.932457 -0 0] [0 0 1 0] [18944.9 -22554.5 147.103 1] "}],"60":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.5 -22700.1 147.103 1] "},{"index":141,"matrix":"[0.976803 0.214142 0 0] [-0.214142 0.976803 0 0] [0 -0 1 0] [19030.7 -22894.7 147.103 1] "},{"index":2,"matrix":"[-0.909323 -0.416092 0 0] [0.416092 -0.909323 -0 0] [0 0 1 0] [18938.6 -22556.9 147.103 1] "}],"61":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.5 -22696.1 147.103 1] "},{"index":141,"matrix":"[0.964431 0.264335 0 0] [-0.264335 0.964431 0 0] [0 -0 1 0] [19039.9 -22892.6 147.103 1] "},{"index":2,"matrix":"[-0.882132 -0.471002 0 0] [0.471002 -0.882132 -0 0] [0 0 1 0] [18932.4 -22559.7 147.103 1] "}],"62":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.5 -22692.2 147.103 1] "},{"index":141,"matrix":"[0.949422 0.314004 0 0] [-0.314004 0.949422 0 0] [0 -0 1 0] [19049 -22890.2 147.103 1] "},{"index":2,"matrix":"[-0.850733 -0.525599 0 0] [0.525599 -0.850733 -0 0] [0 0 1 0] [18926.4 -22562.9 147.103 1] "}],"63":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.5 -22688.3 147.103 1] "},{"index":141,"matrix":"[0.931857 0.362827 0 0] [-0.362827 0.931857 0 0] [0 -0 1 0] [19057.9 -22887.2 147.103 1] "},{"index":2,"matrix":"[-0.815099 -0.579321 0 0] [0.579321 -0.815099 -0 0] [0 0 1 0] [18920.6 -22566.5 147.103 1] "}],"64":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.4 -22684.4 147.103 1] "},{"index":141,"matrix":"[0.911861 0.4105 0 0] [-0.4105 0.911861 0 0] [0 -0 1 0] [19066.7 -22883.8 147.103 1] "},{"index":2,"matrix":"[-0.775337 -0.631548 0 0] [0.631548 -0.775337 -0 0] [0 0 1 0] [18915 -22570.5 147.103 1] "}],"65":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.4 -22680.5 147.103 1] "},{"index":141,"matrix":"[0.889615 0.456711 0 0] [-0.456711 0.889615 0 0] [0 -0 1 0] [19075.3 -22879.9 147.103 1] "},{"index":2,"matrix":"[-0.731725 -0.6816 0 0] [0.6816 -0.731725 -0 0] [0 0 1 0] [18909.8 -22574.8 147.103 1] "}],"66":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.4 -22676.5 147.103 1] "},{"index":141,"matrix":"[0.865334 0.501196 0 0] [-0.501196 0.865334 0 0] [0 -0 1 0] [19083.6 -22875.6 147.103 1] "},{"index":2,"matrix":"[-0.684729 -0.728797 0 0] [0.728797 -0.684729 -0 0] [0 0 1 0] [18904.8 -22579.4 147.103 1] "}],"67":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.4 -22672.6 147.103 1] "},{"index":141,"matrix":"[0.839263 0.543725 0 0] [-0.543725 0.839263 0 0] [0 -0 1 0] [19091.8 -22870.9 147.103 1] "},{"index":2,"matrix":"[-0.634996 -0.772516 0 0] [0.772516 -0.634996 -0 0] [0 0 1 0] [18900.1 -22584.4 147.103 1] "}],"68":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.4 -22668.7 147.103 1] "},{"index":141,"matrix":"[0.811667 0.584121 0 0] [-0.584121 0.811667 0 0] [0 -0 1 0] [19099.7 -22865.8 147.103 1] "},{"index":2,"matrix":"[-0.583283 -0.812269 0 0] [0.812269 -0.583283 -0 0] [0 0 1 0] [18895.8 -22589.6 147.103 1] "}],"69":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.3 -22664.8 147.103 1] "},{"index":141,"matrix":"[0.782812 0.622258 0 0] [-0.622258 0.782812 0 0] [0 -0 1 0] [19107.3 -22860.3 147.103 1] "},{"index":2,"matrix":"[-0.530414 -0.847739 0 0] [0.847739 -0.530414 -0 0] [0 0 1 0] [18891.8 -22595.1 147.103 1] "}],"70":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.3 -22660.9 147.103 1] "},{"index":141,"matrix":"[0.752969 0.658056 0 0] [-0.658056 0.752969 0 0] [0 -0 1 0] [19114.7 -22854.5 147.103 1] "},{"index":2,"matrix":"[-0.477171 -0.878811 0 0] [0.878811 -0.477171 -0 0] [0 0 1 0] [18888.2 -22600.9 147.103 1] "}],"71":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.3 -22656.9 147.103 1] "},{"index":141,"matrix":"[0.722357 0.691521 0 0] [-0.691521 0.722357 0 0] [0 -0 1 0] [19121.7 -22848.3 147.103 1] "},{"index":2,"matrix":"[-0.424227 -0.905556 0 0] [0.905556 -0.424227 -0 0] [0 0 1 0] [18885 -22606.9 147.103 1] "}],"72":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.3 -22653 147.103 1] "},{"index":141,"matrix":"[0.691244 0.722621 0 0] [-0.722621 0.691244 0 0] [0 -0 1 0] [19128.5 -22841.8 147.103 1] "},{"index":2,"matrix":"[-0.372103 -0.928191 0 0] [0.928191 -0.372103 -0 0] [0 0 1 0] [18882.1 -22613.1 147.103 1] "}],"73":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.3 -22649.1 147.103 1] "},{"index":141,"matrix":"[0.659808 0.751434 0 0] [-0.751434 0.659808 0 0] [0 -0 1 0] [19135 -22835 147.103 1] "},{"index":2,"matrix":"[-0.321151 -0.947028 0 0] [0.947028 -0.321151 -0 0] [0 0 1 0] [18879.6 -22619.4 147.103 1] "}],"74":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.2 -22645.2 147.103 1] "},{"index":141,"matrix":"[0.62823 0.778027 0 0] [-0.778027 0.62823 0 0] [0 -0 1 0] [19141.3 -22827.9 147.103 1] "},{"index":2,"matrix":"[-0.271566 -0.96242 0 0] [0.96242 -0.271566 -0 0] [0 0 1 0] [18877.4 -22625.8 147.103 1] "}],"75":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.2 -22641.3 147.103 1] "},{"index":141,"matrix":"[0.596664 0.802491 0 0] [-0.802491 0.596664 0 0] [0 -0 1 0] [19147.2 -22820.6 147.103 1] "},{"index":2,"matrix":"[-0.22342 -0.974722 0 0] [0.974722 -0.22342 -0 0] [0 0 1 0] [18875.5 -22632.4 147.103 1] "}],"76":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.2 -22637.3 147.103 1] "},{"index":141,"matrix":"[0.565227 0.824936 0 0] [-0.824936 0.565227 0 0] [0 -0 1 0] [19152.8 -22813 147.103 1] "},{"index":2,"matrix":"[-0.176687 -0.984267 0 0] [0.984267 -0.176687 -0 0] [0 0 1 0] [18874 -22639 147.103 1] "}],"77":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.2 -22633.4 147.103 1] "},{"index":141,"matrix":"[0.534027 0.845468 0 0] [-0.845468 0.534027 0 0] [0 -0 1 0] [19158.1 -22805.3 147.103 1] "},{"index":2,"matrix":"[-0.131276 -0.991346 0 0] [0.991346 -0.131276 -0 0] [0 0 1 0] [18872.8 -22645.7 147.103 1] "}],"78":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.2 -22629.5 147.103 1] "},{"index":141,"matrix":"[0.503141 0.864204 0 0] [-0.864204 0.503141 0 0] [0 -0 1 0] [19163.1 -22797.3 147.103 1] "},{"index":2,"matrix":"[-0.0870326 -0.996205 0 0] [0.996205 -0.0870326 -0 0] [0 0 1 0] [18871.9 -22652.4 147.103 1] "}],"79":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.1 -22625.6 147.103 1] "},{"index":141,"matrix":"[0.472633 0.88126 0 0] [-0.88126 0.472633 0 0] [0 -0 1 0] [19167.8 -22789.2 147.103 1] "},{"index":2,"matrix":"[-0.0437215 -0.999044 0 0] [0.999044 -0.0437215 -0 0] [0 0 1 0] [18871.3 -22659.2 147.103 1] "}],"80":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.1 -22621.7 147.103 1] "},{"index":141,"matrix":"[0.442541 0.896748 0 0] [-0.896748 0.442541 0 0] [0 -0 1 0] [19172.3 -22780.9 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18871 -22666 147.103 1] "}],"81":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.1 -22617.7 147.103 1] "},{"index":141,"matrix":"[0.412894 0.910779 0 0] [-0.910779 0.412894 0 0] [0 -0 1 0] [19176.5 -22772.5 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18870.9 -22672.8 147.103 1] "}],"82":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998.1 -22613.8 147.103 1] "},{"index":141,"matrix":"[0.383706 0.923455 0 0] [-0.923455 0.383706 0 0] [0 -0 1 0] [19180.3 -22763.9 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18870.7 -22679.6 147.103 1] "}],"83":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998 -22609.9 147.103 1] "},{"index":141,"matrix":"[0.354978 0.934875 0 0] [-0.934875 0.354978 0 0] [0 -0 1 0] [19184 -22755.2 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18870.6 -22686.4 147.103 1] "}],"84":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998 -22606 147.103 1] "},{"index":141,"matrix":"[0.326699 0.945128 0 0] [-0.945128 0.326699 0 0] [0 -0 1 0] [19187.3 -22746.4 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18870.4 -22693.2 147.103 1] "}],"85":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998 -22602.1 147.103 1] "},{"index":141,"matrix":"[0.298848 0.954301 0 0] [-0.954301 0.298848 0 0] [0 -0 1 0] [19190.4 -22737.5 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18870.3 -22700 147.103 1] "}],"86":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998 -22598.1 147.103 1] "},{"index":141,"matrix":"[0.271393 0.962469 0 0] [-0.962469 0.271393 0 0] [0 -0 1 0] [19193.2 -22728.5 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18870.1 -22706.8 147.103 1] "}],"87":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18998 -22594.2 147.103 1] "},{"index":141,"matrix":"[0.244292 0.969702 0 0] [-0.969702 0.244292 0 0] [0 -0 1 0] [19195.7 -22719.5 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18870 -22713.6 147.103 1] "}],"88":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.9 -22590.3 147.103 1] "},{"index":141,"matrix":"[0.21749 0.976063 0 0] [-0.976063 0.21749 0 0] [0 -0 1 0] [19198 -22710.4 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18869.8 -22720.4 147.103 1] "}],"89":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.9 -22586.4 147.103 1] "},{"index":141,"matrix":"[0.190923 0.981605 0 0] [-0.981605 0.190923 0 0] [0 -0 1 0] [19200.1 -22701.2 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18869.7 -22727.2 147.103 1] "}],"90":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.9 -22582.5 147.103 1] "},{"index":141,"matrix":"[0.164513 0.986375 0 0] [-0.986375 0.164513 0 0] [0 -0 1 0] [19201.9 -22691.9 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18869.6 -22734 147.103 1] "}],"91":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.9 -22578.5 147.103 1] "},{"index":141,"matrix":"[0.138169 0.990409 0 0] [-0.990409 0.138169 0 0] [0 -0 1 0] [19203.4 -22682.7 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18869.4 -22740.8 147.103 1] "}],"92":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.9 -22574.6 147.103 1] "},{"index":141,"matrix":"[0.111776 0.993733 0 0] [-0.993733 0.111776 0 0] [0 -0 1 0] [19204.7 -22673.4 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18869.3 -22747.6 147.103 1] "}],"93":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.8 -22570.7 147.103 1] "},{"index":141,"matrix":"[0.0851806 0.996366 0 0] [-0.996366 0.0851806 0 0] [0 -0 1 0] [19205.8 -22664 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18869.1 -22754.4 147.103 1] "}],"94":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.8 -22566.8 147.103 1] "},{"index":141,"matrix":"[0.0582103 0.998304 0 0] [-0.998304 0.0582103 0 0] [0 -0 1 0] [19206.6 -22654.6 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18869 -22761.2 147.103 1] "}],"95":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.8 -22562.9 147.103 1] "},{"index":141,"matrix":"[0.0306518 0.99953 0 0] [-0.99953 0.0306518 0 0] [0 -0 1 0] [19207.1 -22645.2 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18868.8 -22768 147.103 1] "}],"96":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.8 -22558.9 147.103 1] "},{"index":141,"matrix":"[0.00217772 0.999998 0 0] [-0.999998 0.00217772 0 0] [0 -0 1 0] [19207.4 -22635.8 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18868.8 -22768 147.103 1] "}],"97":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.8 -22555 147.103 1] "},{"index":141,"matrix":"[-0.0275859 0.999619 0 0] [-0.999619 -0.0275859 0 0] [0 -0 1 0] [19207.4 -22626.4 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18868.8 -22768 147.103 1] "}],"98":[{"index":113,"matrix":"[-0.00531441 0.999986 0 0] [-0.999986 -0.00531441 0 0] [0 -0 1 0] [18997.7 -22551.1 147.103 1] "},{"index":141,"matrix":"[-0.0591986 0.998246 0 0] [-0.998246 -0.0591986 0 0] [0 -0 1 0] [19207.2 -22617 147.103 1] "},{"index":2,"matrix":"[-0.0214401 -0.99977 0 0] [0.99977 -0.0214401 -0 0] [0 0 1 0] [18868.8 -22768 147.103 1] "}]}
traj_vis/Hemi12_transforms.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "C_01_35mm": "[-0.8622445326446021 -0.497817113029644 -0.09334070869305826 0] [0.49999999999999994 -0.8660254037844387 0.0 0] [-0.08083542493543144 -0.04667035434652912 0.9956342260592881 0] [692.820323027551 399.99999999999994 0.0 1]",
3
+ "C_02_35mm": "[-0.49781711302964426 -0.862244532644602 -0.09334070869305827 0] [0.8660254037844386 -0.5000000000000002 0.0 0] [-0.04667035434652916 -0.08083542493543144 0.9956342260592881 0] [400.0000000000001 692.8203230275509 0.0 1]",
4
+ "C_03_35mm": "[-1.6011019497192098e-16 -0.9956342260592881 -0.09334070869305827 0] [1.0 -1.6081226496766366e-16 0.0 0] [-1.5010330778617594e-17 -0.09334070869305827 0.9956342260592881 0] [4.898587196589413e-14 800.0 0.0 1]",
5
+ "C_04_35mm": "[0.49781711302964377 -0.8622445326446022 -0.09334070869305827 0] [0.8660254037844388 0.4999999999999997 0.0 0] [0.04667035434652911 -0.08083542493543147 0.9956342260592881 0] [-399.99999999999983 692.820323027551 0.0 1]",
6
+ "C_05_35mm": "[0.8622445326446021 -0.4978171130296439 -0.09334070869305826 0] [0.49999999999999983 0.8660254037844387 0.0 0] [0.08083542493543144 -0.046670354346529115 0.9956342260592881 0] [-692.820323027551 399.99999999999994 0.0 1]",
7
+ "C_06_35mm": "[0.9956342260592881 -1.2193002680650596e-16 -0.09334070869305827 0] [1.2246467991473532e-16 1.0 0.0 0] [0.09334070869305827 -1.1430940013109933e-17 0.9956342260592881 0] [-800.0 9.797174393178826e-14 0.0 1]",
8
+ "C_07_35mm": "[0.862244532644602 0.49781711302964415 -0.09334070869305827 0] [-0.5000000000000001 0.8660254037844386 0.0 0] [0.08083542493543144 0.04667035434652914 0.9956342260592881 0] [-692.8203230275509 -400.0000000000001 0.0 1]",
9
+ "C_08_35mm": "[0.4978171130296444 0.8622445326446019 -0.09334070869305827 0] [-0.8660254037844385 0.5000000000000003 0.0 0] [0.046670354346529164 0.08083542493543144 0.9956342260592881 0] [-400.00000000000034 -692.8203230275508 0.0 1]",
10
+ "C_09_35mm": "[2.820402217784269e-16 0.9956342260592881 -0.09334070869305827 0] [-1.0 2.83276944882399e-16 0.0 0] [2.6441270791727528e-17 0.09334070869305827 0.9956342260592881 0] [-1.4695761589768238e-13 -800.0 0.0 1]",
11
+ "C_10_35mm": "[-0.49781711302964426 0.862244532644602 -0.09334070869305827 0] [-0.8660254037844386 -0.5000000000000002 0.0 0] [-0.04667035434652916 0.08083542493543144 0.9956342260592881 0] [400.0000000000001 -692.8203230275509 0.0 1]",
12
+ "C_11_35mm": "[-0.8622445326446019 0.4978171130296444 -0.09334070869305827 0] [-0.5000000000000003 -0.8660254037844385 0.0 0] [-0.08083542493543144 0.046670354346529164 0.9956342260592881 0] [692.8203230275507 -400.00000000000034 0.0 1]",
13
+ "C_12_35mm": "[-0.9956342260592881 1.2193002680650596e-16 -0.09334070869305827 0] [-1.2246467991473532e-16 -1.0 0.0 0] [-0.09334070869305827 1.1430940013109933e-17 0.9956342260592881 0] [800.0 -1.9594348786357651e-13 0.0 1]"
14
+ }
traj_vis/location_data_desert.json ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "name": "loc1",
4
+ "coordinates": {
5
+ "CameraRig_Rail": {
6
+ "position": [
7
+ 0,
8
+ 0,
9
+ 0
10
+ ],
11
+ "rotation": [
12
+ 0,
13
+ 0,
14
+ 0
15
+ ],
16
+ "scale": [
17
+ 1,
18
+ 1,
19
+ 1
20
+ ]
21
+ },
22
+ "CameraTarget": {
23
+ "position": [
24
+ 19000.0,
25
+ -22700.0,
26
+ 0.0
27
+ ],
28
+ "rotation": [
29
+ 0.0,
30
+ 0.0,
31
+ 0.0
32
+ ],
33
+ "scale": [
34
+ 1.0,
35
+ 1.0,
36
+ 1.0
37
+ ]
38
+ },
39
+ "CameraComponent": {
40
+ "position": [
41
+ 0.0,
42
+ 0.0,
43
+ 0.0
44
+ ],
45
+ "rotation": [
46
+ 0.0,
47
+ 0.0,
48
+ 0.0
49
+ ],
50
+ "scale": [
51
+ 1.0,
52
+ 1.0,
53
+ 1.0
54
+ ]
55
+ }
56
+ },
57
+ "Height": "H10"
58
+ },
59
+ {
60
+ "name": "loc2",
61
+ "coordinates": {
62
+ "CameraRig_Rail": {
63
+ "position": [
64
+ 0,
65
+ 0,
66
+ 0
67
+ ],
68
+ "rotation": [
69
+ 0,
70
+ 0,
71
+ 0
72
+ ],
73
+ "scale": [
74
+ 1,
75
+ 1,
76
+ 1
77
+ ]
78
+ },
79
+ "CameraTarget": {
80
+ "position": [
81
+ -200.0,
82
+ -11500.0,
83
+ 130.0
84
+ ],
85
+ "rotation": [
86
+ 0.0,
87
+ 0.0,
88
+ 0.0
89
+ ],
90
+ "scale": [
91
+ 1.0,
92
+ 1.0,
93
+ 1.0
94
+ ]
95
+ },
96
+ "CameraComponent": {
97
+ "position": [
98
+ 0.0,
99
+ 0.0,
100
+ 0.0
101
+ ],
102
+ "rotation": [
103
+ 0.0,
104
+ 0.0,
105
+ 0.0
106
+ ],
107
+ "scale": [
108
+ 1.0,
109
+ 1.0,
110
+ 1.0
111
+ ]
112
+ }
113
+ },
114
+ "Height": "H10"
115
+ },
116
+ {
117
+ "name": "loc3",
118
+ "coordinates": {
119
+ "CameraRig_Rail": {
120
+ "position": [
121
+ 0,
122
+ 0,
123
+ 0
124
+ ],
125
+ "rotation": [
126
+ 0,
127
+ 0,
128
+ 0
129
+ ],
130
+ "scale": [
131
+ 1,
132
+ 1,
133
+ 1
134
+ ]
135
+ },
136
+ "CameraTarget": {
137
+ "position": [
138
+ -22500.0,
139
+ -12900.0,
140
+ 20.0
141
+ ],
142
+ "rotation": [
143
+ 0.0,
144
+ 0.0,
145
+ 0.0
146
+ ],
147
+ "scale": [
148
+ 1.0,
149
+ 1.0,
150
+ 1.0
151
+ ]
152
+ },
153
+ "CameraComponent": {
154
+ "position": [
155
+ 0.0,
156
+ 0.0,
157
+ 0.0
158
+ ],
159
+ "rotation": [
160
+ 0.0,
161
+ 0.0,
162
+ 0.0
163
+ ],
164
+ "scale": [
165
+ 1.0,
166
+ 1.0,
167
+ 1.0
168
+ ]
169
+ }
170
+ },
171
+ "Height": "H10"
172
+ },
173
+ {
174
+ "name": "loc4",
175
+ "coordinates": {
176
+ "CameraRig_Rail": {
177
+ "position": [
178
+ 0,
179
+ 0,
180
+ 0
181
+ ],
182
+ "rotation": [
183
+ 0,
184
+ 0,
185
+ 0
186
+ ],
187
+ "scale": [
188
+ 1,
189
+ 1,
190
+ 1
191
+ ]
192
+ },
193
+ "CameraTarget": {
194
+ "position": [
195
+ -22000.0,
196
+ 6600.0,
197
+ 40.0
198
+ ],
199
+ "rotation": [
200
+ 0.0,
201
+ 0.0,
202
+ 0.0
203
+ ],
204
+ "scale": [
205
+ 1.0,
206
+ 1.0,
207
+ 1.0
208
+ ]
209
+ },
210
+ "CameraComponent": {
211
+ "position": [
212
+ 0.0,
213
+ 0.0,
214
+ 0.0
215
+ ],
216
+ "rotation": [
217
+ 0.0,
218
+ 0.0,
219
+ 0.0
220
+ ],
221
+ "scale": [
222
+ 1.0,
223
+ 1.0,
224
+ 1.0
225
+ ]
226
+ }
227
+ },
228
+ "Height": "H10"
229
+ },
230
+ {
231
+ "name": "loc5",
232
+ "coordinates": {
233
+ "CameraRig_Rail": {
234
+ "position": [
235
+ 0,
236
+ 0,
237
+ 0
238
+ ],
239
+ "rotation": [
240
+ 0,
241
+ 0,
242
+ 0
243
+ ],
244
+ "scale": [
245
+ 1,
246
+ 1,
247
+ 1
248
+ ]
249
+ },
250
+ "CameraTarget": {
251
+ "position": [
252
+ 1300.0,
253
+ 28000.0,
254
+ 20.0
255
+ ],
256
+ "rotation": [
257
+ 0.0,
258
+ 0.0,
259
+ 0.0
260
+ ],
261
+ "scale": [
262
+ 1.0,
263
+ 1.0,
264
+ 1.0
265
+ ]
266
+ },
267
+ "CameraComponent": {
268
+ "position": [
269
+ 0.0,
270
+ 0.0,
271
+ 0.0
272
+ ],
273
+ "rotation": [
274
+ 0.0,
275
+ 0.0,
276
+ 0.0
277
+ ],
278
+ "scale": [
279
+ 1.0,
280
+ 1.0,
281
+ 1.0
282
+ ]
283
+ }
284
+ },
285
+ "Height": "H10"
286
+ }
287
+ ]
utils.py CHANGED
@@ -19,10 +19,93 @@ import os
19
  import numpy as np
20
  from io import BytesIO
21
  import imageio.v2 as imageio
22
- import open3d
23
  import math
24
- from tools.vis_cam import get_camera_frustum, frustums2lineset
25
  import trimesh
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  def parse_matrix(matrix_str):
28
  rows = matrix_str.strip().split('] [')
@@ -121,8 +204,8 @@ def get_cam_points_vis(W, H, intrinsics, ext_pose, color,frustum_length):
121
  cam_points = np.concatenate((cam_points, np.linspace(cam[0][item[0]], cam[0][item[1]], num=1000, endpoint=True, retstep=False, dtype=None)))
122
  cam_points[:,0]*=-1
123
  cam_points = trimesh.points.PointCloud(vertices = cam_points, colors=[0, 255, 0, 255])
124
- cam_points_vis = open3d.geometry.PointCloud()
125
- cam_points_vis.points = open3d.utility.Vector3dVector(cam_points)
126
  cam_points_vis.paint_uniform_color(color)
127
  return cam_points_vis
128
 
 
19
  import numpy as np
20
  from io import BytesIO
21
  import imageio.v2 as imageio
22
+ import open3d as o3d
23
  import math
 
24
  import trimesh
25
+ import json
26
+
27
+
28
+ def get_camera_frustum(img_size, K, W2C, frustum_length=0.5, color=[0., 1., 0.]):
29
+ W, H = img_size
30
+ hfov = np.rad2deg(np.arctan(W / 2. / K[0, 0]) * 2.)
31
+ vfov = np.rad2deg(np.arctan(H / 2. / K[1, 1]) * 2.)
32
+ half_w = frustum_length * np.tan(np.deg2rad(hfov / 2.))
33
+ half_h = frustum_length * np.tan(np.deg2rad(vfov / 2.))
34
+
35
+ # build view frustum for camera (I, 0)
36
+ frustum_points = np.array([[0., 0., 0.], # frustum origin
37
+ [-half_w, -half_h, frustum_length], # top-left image corner
38
+ [half_w, -half_h, frustum_length], # top-right image corner
39
+ [half_w, half_h, frustum_length], # bottom-right image corner
40
+ [-half_w, half_h, frustum_length]]) # bottom-left image corner
41
+ frustum_lines = np.array([[0, i] for i in range(1, 5)] + [[i, (i+1)] for i in range(1, 4)] + [[4, 1]])
42
+ frustum_colors = np.tile(np.array(color).reshape((1, 3)), (frustum_lines.shape[0], 1))
43
+
44
+ # frustum_colors = np.vstack((np.tile(np.array([[1., 0., 0.]]), (4, 1)),
45
+ # np.tile(np.array([[0., 1., 0.]]), (4, 1))))
46
+
47
+ # transform view frustum from (I, 0) to (R, t)
48
+ C2W = np.linalg.inv(W2C)
49
+ frustum_points = np.dot(np.hstack((frustum_points, np.ones_like(frustum_points[:, 0:1]))), C2W.T)
50
+ frustum_points = frustum_points[:, :3] / frustum_points[:, 3:4]
51
+
52
+ return frustum_points, frustum_lines, frustum_colors
53
+
54
+
55
+ def frustums2lineset(frustums):
56
+ N = len(frustums)
57
+ merged_points = np.zeros((N*5, 3)) # 5 vertices per frustum
58
+ merged_lines = np.zeros((N*8, 2)) # 8 lines per frustum
59
+ merged_colors = np.zeros((N*8, 3)) # each line gets a color
60
+
61
+ for i, (frustum_points, frustum_lines, frustum_colors) in enumerate(frustums):
62
+ merged_points[i*5:(i+1)*5, :] = frustum_points
63
+ merged_lines[i*8:(i+1)*8, :] = frustum_lines + i*5
64
+ merged_colors[i*8:(i+1)*8, :] = frustum_colors
65
+
66
+ lineset = o3d.geometry.LineSet()
67
+ lineset.points = o3d.utility.Vector3dVector(merged_points)
68
+ lineset.lines = o3d.utility.Vector2iVector(merged_lines)
69
+ lineset.colors = o3d.utility.Vector3dVector(merged_colors)
70
+
71
+ return lineset
72
+
73
+ def visualize_cameras(colored_camera_dicts, sphere_radius, camera_size=0.1, geometry_file=None, geometry_type='mesh'):
74
+ sphere = o3d.geometry.TriangleMesh.create_sphere(radius=sphere_radius, resolution=10)
75
+ sphere = o3d.geometry.LineSet.create_from_triangle_mesh(sphere)
76
+ sphere.paint_uniform_color((1, 0, 0))
77
+
78
+ coord_frame = o3d.geometry.TriangleMesh.create_coordinate_frame(size=0.5, origin=[0., 0., 0.])
79
+ things_to_draw = [sphere, coord_frame]
80
+
81
+ idx = 0
82
+ for color, camera_dict in colored_camera_dicts:
83
+ idx += 1
84
+
85
+ cnt = 0
86
+ frustums = []
87
+ for img_name in sorted(camera_dict.keys()):
88
+ K = np.array(camera_dict[img_name]['K']).reshape((4, 4))
89
+ W2C = np.array(camera_dict[img_name]['W2C']).reshape((4, 4))
90
+ C2W = np.linalg.inv(W2C)
91
+ img_size = camera_dict[img_name]['img_size']
92
+ frustums.append(get_camera_frustum(img_size, K, W2C, frustum_length=camera_size, color=color))
93
+ cnt += 1
94
+ cameras = frustums2lineset(frustums)
95
+ things_to_draw.append(cameras)
96
+
97
+ if geometry_file is not None:
98
+ if geometry_type == 'mesh':
99
+ geometry = o3d.io.read_triangle_mesh(geometry_file)
100
+ geometry.compute_vertex_normals()
101
+ elif geometry_type == 'pointcloud':
102
+ geometry = o3d.io.read_point_cloud(geometry_file)
103
+ else:
104
+ raise Exception('Unknown geometry_type: ', geometry_type)
105
+
106
+ things_to_draw.append(geometry)
107
+
108
+ o3d.visualization.draw_geometries(things_to_draw)
109
 
110
  def parse_matrix(matrix_str):
111
  rows = matrix_str.strip().split('] [')
 
204
  cam_points = np.concatenate((cam_points, np.linspace(cam[0][item[0]], cam[0][item[1]], num=1000, endpoint=True, retstep=False, dtype=None)))
205
  cam_points[:,0]*=-1
206
  cam_points = trimesh.points.PointCloud(vertices = cam_points, colors=[0, 255, 0, 255])
207
+ cam_points_vis = o3d.geometry.PointCloud()
208
+ cam_points_vis.points = o3d.utility.Vector3dVector(cam_points)
209
  cam_points_vis.paint_uniform_color(color)
210
  return cam_points_vis
211
 
vis_trajectory.py ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import trimesh
2
+ import numpy as np
3
+ import imageio
4
+ import copy
5
+ import cv2
6
+ import os
7
+ from glob import glob
8
+ import open3d
9
+ from multiprocessing import Pool
10
+ import json
11
+ from utils import *
12
+
13
+ if __name__ == '__main__' :
14
+
15
+ H = 480
16
+ W = 720
17
+ intrinsics = np.array([[1000.,0.],
18
+ [0., 1000.]])
19
+
20
+ cam_path = "traj_vis/Hemi12_transforms.json"
21
+ location_path = "traj_vis/location_data_desert.json"
22
+ video_name = "D_loc1_61_t3n13_003d_Hemi12_1.json"
23
+
24
+ with open(location_path, 'r') as f: locations = json.load(f)
25
+ locations_info = {locations[idx]['name']:locations[idx] for idx in range(len(locations))}
26
+ location_name = video_name.split('_')[1]
27
+ location_info = locations_info[location_name]
28
+ translation = location_info['coordinates']['CameraTarget']['position']
29
+ vis_all = []
30
+
31
+ # vis cam
32
+ with open(cam_path, 'r') as file:
33
+ data = json.load(file)
34
+ cam_poses = []
35
+ for i, key in enumerate(data.keys()):
36
+ if "C_" in key:
37
+ cam_poses.append(parse_matrix(data[key]))
38
+ cam_poses = np.stack(cam_poses)
39
+ cam_poses = np.transpose(cam_poses, (0,2,1))
40
+ cam_poses[:,:3,3] /= 100.
41
+ relative_pose = np.linalg.inv(cam_poses[0])
42
+ cam_num = len(cam_poses)
43
+ for idx in range(cam_num):
44
+ cam_pose = cam_poses[idx]
45
+ cam_pose = cam_pose[:, [1,2,0,3]]
46
+ cam_pose = relative_pose @ cam_pose
47
+ cam_points_vis = get_cam_points_vis(W, H, intrinsics, cam_pose, [0.4, 0.4, 0.4], frustum_length=1.)
48
+ vis_all.append(cam_points_vis)
49
+
50
+ # vis gt obj poses
51
+ start_frame_ind = 10
52
+ sample_n_frames = 77
53
+ frame_indices = np.linspace(start_frame_ind, start_frame_ind + sample_n_frames - 1, sample_n_frames, dtype=int)
54
+
55
+ with open('traj_vis/'+video_name, 'r') as file:
56
+ data = json.load(file)
57
+ obj_poses = []
58
+ for i, key in enumerate(data.keys()):
59
+ obj_poses.append(parse_matrix(data[key][0]['matrix']))
60
+ obj_poses = np.stack(obj_poses)
61
+ obj_poses = np.transpose(obj_poses, (0,2,1))
62
+
63
+ obj_poses[:,:3,3] -= translation
64
+ obj_poses[:,:3,3] /= 100.
65
+ obj_poses = obj_poses[:, :, [1,2,0,3]]
66
+ obj_poses = relative_pose @ obj_poses
67
+ obj_poses = obj_poses[frame_indices]
68
+
69
+ obj_num = len(obj_poses)
70
+ for idx in range(obj_num):
71
+ obj_pose = obj_poses[idx]
72
+ if idx % 5 == 0:
73
+ cam_points_vis = get_cam_points_vis(W, H, intrinsics, obj_pose, [0.8, 0., 0.], frustum_length=0.5)
74
+ vis_all.append(cam_points_vis)
75
+
76
+ if len(data[key])>=2:
77
+ with open('traj_vis/'+video_name, 'r') as file:
78
+ data = json.load(file)
79
+ obj_poses = []
80
+ for i, key in enumerate(data.keys()):
81
+ obj_poses.append(parse_matrix(data[key][1]['matrix']))
82
+ obj_poses = np.stack(obj_poses)
83
+ obj_poses = np.transpose(obj_poses, (0,2,1))
84
+ obj_poses[:,:3,3] -= translation
85
+ obj_poses[:,:3,3] /= 100.
86
+ obj_poses = obj_poses[:, :, [1,2,0,3]]
87
+ obj_poses = relative_pose @ obj_poses
88
+ obj_poses = obj_poses[frame_indices]
89
+ obj_num = len(obj_poses)
90
+ for idx in range(obj_num):
91
+ obj_pose = obj_poses[idx]
92
+ if (idx % 5 == 0) :
93
+ cam_points_vis = get_cam_points_vis(W, H, intrinsics, obj_pose, [0., 0.8,0.], frustum_length=0.5)
94
+ vis_all.append(cam_points_vis)
95
+
96
+ if len(data[key])>=3:
97
+ with open('traj_vis/'+video_name, 'r') as file:
98
+ data = json.load(file)
99
+ obj_poses = []
100
+ for i, key in enumerate(data.keys()):
101
+ obj_poses.append(parse_matrix(data[key][2]['matrix']))
102
+ obj_poses = np.stack(obj_poses)
103
+ obj_poses = np.transpose(obj_poses, (0,2,1))
104
+ obj_poses[:,:3,3] -= translation
105
+ obj_poses[:,:3,3] /= 100.
106
+ obj_poses = obj_poses[:, :, [1,2,0,3]]
107
+ obj_poses = relative_pose @ obj_poses
108
+ obj_poses = obj_poses[frame_indices]
109
+ obj_num = len(obj_poses)
110
+ for idx in range(obj_num):
111
+ obj_pose = obj_poses[idx]
112
+ if (idx % 5 == 0):
113
+ cam_points_vis = get_cam_points_vis(W, H, intrinsics, obj_pose, [0., 0., 0.8], frustum_length=0.5)
114
+ vis_all.append(cam_points_vis)
115
+
116
+ # vis coordinates
117
+ axis = open3d.geometry.TriangleMesh.create_coordinate_frame(size=2, origin=[0,0,0])
118
+ # vis_all.append(axis)
119
+
120
+ open3d.visualization.draw_geometries(vis_all)