def road_mapper(self, frame):
road_spots = self.road_spotter(frame)
#road_map = np.zeros(np.shape(road_spots), np.float)
#First we deal with all the points
road_map[:, 1, :] = self.camera_height * np.tan(self.camera_to_ground_arc +
road_spots[:, 0, :] * self.camera_arc_x/self.crop_ratio[1])
road_map[:, 0, :] = np.multiply( np.power( ( np.power(self.camera_height, 2) +
np.power(road_map[:, 1, :], 2) ), 0.5 ) , np.tan(self.camera_offset_y +
(road_spots[:, 1, :]-0.5)*self.camera_arc_y ) )
return road_map
# pilot_mk1 is currently only built for low speed operation
评论列表
文章目录