-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Lane Follower constants to .toml, beginning effort to move this…
… full module to dev
- Loading branch information
1 parent
e5fd3d1
commit d0c80ed
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import toml | ||
import cv2 | ||
|
||
# import numpy as np | ||
|
||
|
||
class LaneFollower: | ||
|
||
def __init__( | ||
self, odom_sub, cam_left, cam_right, toml_path='Follower_Consts.toml' | ||
): | ||
self.vidcap_left = cv2.VideoCapture(cam_left) | ||
self.vidcap_right = cv2.VideoCapture(cam_right) | ||
self.const = toml.load(toml_path)["Lane_Follower"] | ||
# LOWER = np.array(self.const['lower_hsv']) | ||
# UPPER = np.array(self.const['upper_hsv']) | ||
# PTS1 = np.float32([tl, bl, tr, br]) | ||
# PTS2 = np.float32([[0, 0], [0, 480], [640, 0], [640, 480]]) | ||
# # Matrix to warp the image for birdseye window | ||
# UNWARP = cv2.getPerspectiveTransform(pts1, pts2) |