Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions laser_tracker/laser_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ def track(self, frame, mask):
"""
center = None

countours = cv2.findContours(mask, cv2.RETR_EXTERNAL,
contours = cv2.findContours(mask, cv2.RETR_EXTERNAL,
cv2.CHAIN_APPROX_SIMPLE)[-2]

# only proceed if at least one contour was found
if len(countours) > 0:
if len(contours) > 0:
# find the largest contour in the mask, then use
# it to compute the minimum enclosing circle and
# centroid
c = max(countours, key=cv2.contourArea)
c = max(contours, key=cv2.contourArea)
((x, y), radius) = cv2.minEnclosingCircle(c)
moments = cv2.moments(c)
if moments["m00"] > 0:
Expand Down