pixel_size = pixel_size / 1000 # unit: m/px end_time = time.time() print("--- %s seconds ---" % (time.time() - start_time)) read_time = end_time - start_time ################### ################### ################### print('Read EOP - ' + filename + ".txt") print('Latitude | Longitude | Height | Omega | Phi | Kappa') file_path = root + '/' + filename + '.txt' eo = readEO(file_path) # convert to the correct area( can continue) eo = geographic2plane(eo, epsg) print("eo:",eo) # rot matrix R = Rot3D(eo) # 4. Extract a projected boundary of the image bbox = boundary(restored_image, eo, R, ground_height, pixel_size, focal_length) print("bbox:",bbox) # break print("--- %s seconds ---" % (time.time() - start_time)) # 5. Compute GSD & Boundary size # GSD gsd = (pixel_size * (eo[2] - ground_height)) / focal_length # unit: m/px print("gsd:",gsd)
image_rows = restored_image.shape[0] image_cols = restored_image.shape[1] pixel_size = sensor_width / image_cols # unit: mm/px pixel_size = pixel_size / 1000 # unit: m/px end_time = time.time() print("--- %s seconds ---" % (time.time() - start_time)) read_time = end_time - start_time else: print('Read EOP - ' + file) print('Latitude | Longitude | Height | Omega | Phi | Kappa') eo = readEO(file_path) eo = geographic2plane(eo) R = Rot3D(eo) # 4. Extract a projected boundary of the image bbox = boundary(restored_image, eo, R, ground_height, pixel_size, focal_length) print("--- %s seconds ---" % (time.time() - start_time)) # 5. Compute GSD & Boundary size # GSD gsd = (pixel_size * (eo[2] - ground_height)) / focal_length # unit: m/px # Boundary size boundary_cols = int((bbox[1, 0] - bbox[0, 0]) / gsd) boundary_rows = int((bbox[3, 0] - bbox[2, 0]) / gsd) # 6. Compute coordinates of the projected boundary print('projectedCoord')
image_rows = restored_image.shape[0] image_cols = restored_image.shape[1] pixel_size = sensor_width / image_cols # unit: mm/px pixel_size = pixel_size / 1000 # unit: m/px end_time = time.time() print("--- %s seconds ---" % (time.time() - start_time)) read_time = end_time - start_time else: print('Read EOP - ' + file) print('Latitude | Longitude | Height | Omega | Phi | Kappa') eo = readEO(file_path) eo = geographic2plane(eo, 4326) R = Rot3D(eo) # 4. Extract a projected boundary of the image bbox = boundary(restored_image, eo, R, ground_height, pixel_size, focal_length) print("--- %s seconds ---" % (time.time() - start_time)) # 5. Compute GSD & Boundary size # GSD gsd = (pixel_size * (eo[2] - ground_height)) / focal_length # unit: m/px # Boundary size boundary_cols = int((bbox[1, 0] - bbox[0, 0]) / gsd) boundary_rows = int((bbox[3, 0] - bbox[2, 0]) / gsd)
pixel_size = pixel_size / 1000 # unit: m/px end_time = time.time() print("--- %s seconds ---" % (time.time() - start_time)) read_time = end_time - start_time ################### ################### ################### print('Read EOP - ' + filename + ".txt") print('Latitude | Longitude | Height | Omega | Phi | Kappa') file_path = root + '/' + filename + '.txt' eo = readEO(file_path) # convert to the correct area( can continue) eo = geographic2plane(eo, epsg=5186) # rot matrix R = Rot3D(eo) # 4. Extract a projected boundary of the image bbox = boundary(restored_image, eo, R, ground_height, pixel_size, focal_length) print("bbox:", bbox) # break print("--- %s seconds ---" % (time.time() - start_time)) # 5. Compute GSD & Boundary size # GSD gsd = (pixel_size * (eo[2] - ground_height)) / focal_length # unit: m/px