From 2aac2354f9c78add649d6de47ee95a3ec667b5ed Mon Sep 17 00:00:00 2001 From: Pavel Lutskov Date: Mon, 18 Jun 2018 20:19:47 +0200 Subject: [PATCH] small goal detection refactoring --- pykick/finders.py | 4 +++- pykick/nao_defaults.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pykick/finders.py b/pykick/finders.py index df287ce..b8ade36 100644 --- a/pykick/finders.py +++ b/pykick/finders.py @@ -33,7 +33,7 @@ class GoalFinder(object): # Final similarity score is just the sum of both final_score = shape_sim + area_sim - print('Goal:', shape_sim, area_sim, final_score) + print('Candidate:', shape_sim, area_sim, final_score) return final_score def find_goal_contour(self, frame): @@ -68,6 +68,8 @@ class GoalFinder(object): similarities = [self.goal_similarity(cnt) for cnt in good_cnts] best = min(similarities) + print('Final score:', best) + print() if best > 0.35: return None # Find the contour with the shape closest to that of the goal diff --git a/pykick/nao_defaults.json b/pykick/nao_defaults.json index 70d4fca..4809179 100644 --- a/pykick/nao_defaults.json +++ b/pykick/nao_defaults.json @@ -8,7 +8,7 @@ [ 0, 0, - 140 + 159 ], [ 180,