Skip to content

Commit

Permalink
Add logging of how image templates match the screenshot.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithMa committed Feb 26, 2024
1 parent 34282af commit bd979a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/image_decision_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ def make_decision(template_images: dict[str, cv2.Mat], image_name: str) -> GameA
for image_file, img_template in template_images.items():
result = image_service.find_image(img_screenshot, img_template)
if result:
logging.debug(f"Image {image_file} matches with {result.val * 100}%")
if result.val > 0.90:
find_image_results.append((image_file, result))

logging.debug("Found images over threshold:")
logging.debug(find_image_results)
return analyze_results_and_return_action_with_priority(find_image_results)

Expand Down

0 comments on commit bd979a0

Please sign in to comment.