if surface_m < 0.1: surface_m = image_node.getFloat("srtm_surface_m") yaw_error_deg = image_node.getFloat("yaw_error") image.set_aircraft_yaw_error_estimate(yaw_error_deg) proj_list = project.projectVectors(IK, image.get_body2ned(), image.get_cam2body(), grid_list) ned, ypr, quat = image.get_camera_pose() pts_ned = project.intersectVectorsWithGroundPlane(ned, surface_m, proj_list) #print(image.name, "pts_3d (ned):\n", pts_ned) # convert ned to xyz and stash the result for each image image.grid_list = [] for p in pts_ned: image.grid_list.append([p[1], p[0], -p[2]]) # generate the panda3d egg models dir_node = getNode('/config/directories', True) img_src_dir = dir_node.getString('images_source') panda3d.generate_from_grid(proj, name_list, src_dir=img_src_dir, analysis_dir=proj.analysis_dir, resolution=args.texture_resolution) # call the ac3d generator # AC3D.generate(proj.image_list, group_list[0], src_dir=img_src_dir, # analysis_dir=proj.analysis_dir, base_name='direct', # version=1.0, trans=0.1, resolution=args.texture_resolution)
image.z_avg, proj_list) elif True: # intersect with our polygon surface approximation pts_ned = intersect_vectors(ned, proj_list, -image.z_avg) elif False: # (moving away from the binned surface approach in this # script towards the above delauney interpolation # approach) # intersect with 2d binned surface approximation pts_ned = bin2d.intersect_vectors(ned, proj_list, -image.z_avg) #print(image.name, "pts_3d (ned):\n", pts_ned) # convert ned to xyz and stash the result for each image image.grid_list = [] for p in pts_ned: image.grid_list.append( [p[1], p[0], -p[2]] ) # generate the panda3d egg models dir_node = getNode('/config/directories', True) img_src_dir = dir_node.getString('images_source') panda3d.generate_from_grid(proj, group_list[args.group], src_dir=img_src_dir, analysis_dir=proj.analysis_dir, resolution=args.texture_resolution) # call the ac3d generator # AC3D.generate(proj.image_list, group_list[0], src_dir=img_src_dir, # analysis_dir=proj.analysis_dir, base_name='direct', # version=1.0, trans=0.1, resolution=args.texture_resolution)