Add init and lazy loading to init
This commit is contained in:
@@ -3,8 +3,13 @@ import numpy as np
|
||||
import cv2
|
||||
|
||||
class SimpleHandRecogniser(HandRecogniser):
|
||||
def load_image(self, image_path):
|
||||
self.img = cv2.imread(image_path, 1)
|
||||
def __init__(self, image_path = ""):
|
||||
self._image_path = image_path
|
||||
|
||||
def load_image(self, image_path = None):
|
||||
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 __calc_pos_y(self, x, radius, centre):
|
||||
|
||||
Reference in New Issue
Block a user