Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save simondegheselle/060957139b1a35cb2178659cc0bf5342 to your computer and use it in GitHub Desktop.
Save simondegheselle/060957139b1a35cb2178659cc0bf5342 to your computer and use it in GitHub Desktop.
def thread_worker(self, painting):
"""Function that a thread uses for searching the hall of an image"""
print("Trying to match a possible painting")
if (self.paintingDetector.isPainting(painting)):
matches = self.paintingRecognizer.recognize(painting)
if matches[0][1] > 0:
# (hal, image_path, aantalmatches)
return (matches[0][0], matches[0][2][2], matches[0][1])
return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment