implemented basic state machine
This commit is contained in:
@@ -77,6 +77,10 @@ class GoalFinder(object):
|
||||
def left_right_post(self, contour):
|
||||
return contour[:,0].min(), contour[:,0].max()
|
||||
|
||||
def goal_center(self, contour):
|
||||
l, r = self.left_right_post(self, contour)
|
||||
return (l + r) / 2
|
||||
|
||||
def draw(self, frame):
|
||||
goal = self.find_goal_contour(frame)
|
||||
if goal is not None:
|
||||
|
||||
Reference in New Issue
Block a user