From fb2de9ffbf7cc20a2c01105acc2f0a914a0e3582 Mon Sep 17 00:00:00 2001 From: togamid <54776413+togamid@users.noreply.github.com> Date: Sun, 1 Sep 2019 21:28:31 +0200 Subject: [PATCH] Fixed spelling of variable "countours" Fixed the spelling of the variable countours to contours --- laser_tracker/laser_tracker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/laser_tracker/laser_tracker.py b/laser_tracker/laser_tracker.py index 0eccb9a..8308e05 100755 --- a/laser_tracker/laser_tracker.py +++ b/laser_tracker/laser_tracker.py @@ -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: