Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Fix bug from issue #4: #7

Merged
merged 1 commit into from
Sep 12, 2019
Merged
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: 5 additions & 1 deletion interface/Major.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ def __init__(self):

def get_basic(self):
for basic_scene in self.basic_scenes:
if analyze(self.screenshot, basic_scene, self.threshold) == 1:
x, y = basic_scene.shape[0:2]
xx, yy = self.screenshot.shape[0:2]
factor = min(1., 1. * xx / x, 1. * yy / y)
resized_scene = cv2.resize(basic_scene, int(x * factor), int(y * factor))
if analyze(self.screenshot, resized_scene, self.threshold) == 1:
basic_interface = Basic()
basic_interface.scene = basic_scene
basic_interface.sh = self.screenshot
Expand Down