def __init__(self, cam, robot_name): trr_vu.Pipeline.__init__(self) be_param = trr_vu.NamedBirdEyeParam(robot_name) self.cam = cam self.set_roi((0, 0), (cam.w, cam.h)) self.bird_eye = trr_vu.BirdEyeTransformer(cam, be_param) self.line_finder = trr_vu.HoughLinesFinder(self.bird_eye.mask_unwraped) self.lane_model = trr_u.LaneModel()
def __init__(self, cam, robot_name): trr_vu.Pipeline.__init__(self) be_param = trr_vu.NamedBirdEyeParam(robot_name) self.bird_eye = trr_vu.BirdEyeTransformer(cam, be_param) self.line_finder = trr_vu.HoughLinesFinder(self.bird_eye.mask_unwraped) self.lane_model = trr_u.LaneModel() self.img = None self.undistorted_img = None self.display_mode = Foo4Pipeline.show_be
def __init__(self, cam, robot_name): trr_vu.Pipeline.__init__(self) self.thresholder = trr_vu.BinaryThresholder() self.contour_finder = trr_vu.ContourFinder(min_area=500) self.floor_plane_injector = trr_vu.FloorPlaneInjector() be_param = trr_vu.NamedBirdEyeParam(robot_name) self.bird_eye = trr_vu.BirdEyeTransformer(cam, be_param) self.lane_model = trru.LaneModel() self.display_mode = Contour1Pipeline.show_contour self.img = None
def __init__(self, cam, robot_name): trr_vu.Pipeline.__init__(self) be_param = trr_vu.NamedBirdEyeParam(robot_name) self.cam = cam self.set_roi((0, 0), (cam.w, cam.h)) self.bird_eye = trr_vu.BirdEyeTransformer(cam, be_param) self.thresholder = trr_vu.BinaryThresholder() self.contour_finder = trr_vu.ContourFinder(min_area=500) self.lane_model = trr_u.LaneModel() self.display_mode = Contour3Pipeline.show_none self.img = None
def __init__(self, cam, robot_name): trr_vu.Pipeline.__init__(self) self.sfd = trr_vu.StartFinishDetector() self.dist_to_start, self.dist_to_finish = np.float('inf'), np.float('inf') self.bird_eye = trr_vu.BirdEyeTransformer(cam, trr_vu.NamedBirdEyeParam(robot_name)) self.img_bgr = None self.set_debug_display(StartFinishDetectPipeline.show_none, False) self.set_roi((0, 110), (cam.w, cam.h))
def __init__(self, cam, robot_name): trr_vu.Pipeline.__init__(self) be_param = trr_vu.NamedBirdEyeParam(robot_name) self.bird_eye = trr_vu.BirdEyeTransformer(cam, be_param)
def test_load(filename='/tmp/pipe_run.npz'): print('loading path from {}'.format(filename)) data = np.load(filename) times, lane_mod_coefs = data['times'], data['lane_mod_coefs'] plot_run(times, lane_mod_coefs) if __name__ == '__main__': #test_load() robot_pierrette, robot_caroline, robot_christine = range(3) robot_names = ['pierrette', 'caroline', 'christine'] robot = robot_christine intr_cam_calib_dir = '/home/poine/.ros/camera_info/' intr_cam_calib_path = '{}/{}_camera_road_front.yaml'.format(intr_cam_calib_dir, robot_names[robot]) be_param = trr_vu.NamedBirdEyeParam(robot_names[robot]) if robot == robot_pierrette: extr_cam_calib_path = '/home/poine/work/roverboard/roverboard_description/cfg/pierrette_cam1_extr.yaml' elif robot == robot_caroline: extr_cam_calib_path = '/home/poine/work/roverboard/roverboard_description/cfg/caroline_cam_road_front_extr.yaml' elif robot == robot_christine: extr_cam_calib_path = '/home/poine/work/oscar/oscar/oscar_description/cfg/christine_cam_road_front_extr.yaml' cam = trr_vu.load_cam_from_files(intr_cam_calib_path, extr_cam_calib_path) pipe_1, pipe_2, pipe_3, pipe_4 = range(4) pipe_type = pipe_2 if pipe_type == pipe_1: # 154hz pipe = trr_l1.Contour1Pipeline(cam) pipe.thresholder.set_threshold(150) pipe.display_mode = pipe.show_contour elif pipe_type == pipe_2: # now 200hz