Make hand gesture recogniser and test work on frames

This commit is contained in:
DSTO\pivatom
2018-12-18 14:24:33 +10:30
parent 363122fe29
commit 11604228fc
2 changed files with 7 additions and 19 deletions

View File

@@ -3,18 +3,8 @@ import numpy as np
import cv2
class SimpleHandRecogniser(HandRecogniser):
def __init__(self, image_path = ""):
self._image_path = image_path
def load_image(self, image_path = None):
"""
Loads the given image path into memory. This must be called before
any other operations can be completed.
"""
if image_path is not None:
self._image_path = image_path
self.img = cv2.imread(self._image_path, 1)
self.img = cv2.resize(self.img, None, fx=0.1, fy=0.1, interpolation = cv2.INTER_AREA)
def __init__(self, frame):
self.img = frame
def __calc_pos_y(self, x, radius, centre):
"""