Ejemplo n.º 1
0
         data=sfm3DRegion.trajectoryData,
         name='programTrajectory',
         point_size=5,
         matrix=sfm3DRegion.matrix)
     if needAlign:
         programSFM3DRegion.align_flip()
         programTrajectory.align_flip()
 """
 Create the global metric point cloud,
 then set the region anchor
 """
 # anchor is sorted and pick the first one
 # now load the anchor that had been stored
 anchor = dashCamFileProcess.get_trajectory_anchor(fileID)
 fileID += mapType
 sv3DRegion = google_parse.StreetView3DRegion(fileID)
 sv3DRegion.init_region(anchor=anchor)
 if createSV:
     sv3DRegion.create_topoloy()
     sv3DRegion.create_region_time(start=7, end=10)
     #sv3DRegion.create_region()
     pano_length = len(sv3DRegion.panoramaList)
     anchor_inv = np.linalg.inv(sv3DRegion.anchorMatrix)
     zero_vec, pano_ori_set, dis_len_set = [0, 0, 0, 1], np.zeros(
         (pano_length, 3)), np.zeros((pano_length))
     # Initialize the pano according to location(lat, lon)
     for i in range(0, pano_length):
         sv3D = sv3DRegion.sv3D_Time[i]
         sv3D.apply_global_adjustment(
         )  # Absolute position on earth (lat, lon, yaw)
         sv3D.apply_local_adjustment(
Ejemplo n.º 2
0
         point_size=5,
         matrix=sfm3DRegion.matrix)
     if needAlign:
         programSFM3DRegion.align_flip()
         programTrajectory.align_flip()
 """
 Create the global metric point cloud, then set the region anchor.
 """
 if createSV:
     """
     Create Region.
     """
     # Anchor was stored by sorting region and picking the first one. Now load the anchor that had been stored.
     anchor = dashCamFileProcess.get_trajectory_anchor(fileID)
     sv3DRegion = google_parse.StreetView3DRegion(fileID + mapType,
                                                  d_height=texture_height,
                                                  d_width=texture_width)
     sv3DRegion.init_region(anchor=anchor)
     # Create point cloud
     sv3DRegion.create_topology()
     sv3DRegion.create_region_time_bilinear_depth(start=8, end=9)
     """
     Fine tune Region. (Originally for alignment. Now for finding the nearest panoram.)
     """
     # Store metadata of the created region
     pano_length = len(sv3DRegion.panoramaList)
     anchor_inv = np.linalg.inv(sv3DRegion.anchorMatrix)
     zero_vec, pano_ori_set, dis_len_set = [0, 0, 0, 1], np.zeros(
         (pano_length, 3)), np.zeros(pano_length)
     # Initialize the pano according to location(lat, lon)
     for i in range(0, pano_length):