Esempio n. 1
0
 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()
Esempio n. 2
0
 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
Esempio n. 3
0
 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
Esempio n. 4
0
 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
Esempio n. 5
0
    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))
Esempio n. 6
0
def work(img, intr_cam_calib_path, extr_cam_calib_path):
    cam = trr_vu.load_cam_from_files(intr_cam_calib_path, extr_cam_calib_path)
    undistorted_img = cam.undistort_img(img)
    p = trr_vu.ChristineBirdEyeParam()
    be = trr_vu.BirdEyeTransformer(cam, p)

    if 0: # OK, sortof... needs to investigate the differences - interpolation?
        img_be, img_be_ref = make_be_map(be, undistorted_img)
        print('same? {}'.format(np.allclose(img_be, img_be_ref)))
        cv2.imshow('bird eye', img_be)
        cv2.imshow('bird eye ref', img_be_ref)
        cv2.imwrite('/tmp/be_frame_000000.png', img_be)
        cv2.waitKey(0)
    if 0: # OK
        img_undist, img_undist_ref = make_undist_map(cam, img)
    if 1:
        make_composite_map(be, cam, img)
Esempio n. 7
0
 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)