Added figures to perception and overview

This commit is contained in:
2018-08-08 12:09:12 +02:00
parent 801ac12cc7
commit 81f2db1b9d
9 changed files with 79 additions and 30 deletions

View File

@@ -13,8 +13,7 @@ from .utils import read_config, imresize, hsv_mask, InterruptDelayed
class Colorpicker(object):
WINDOW_CAPTURE_NAME = 'Object Detection (or not)'
WINDOW_DETECTION_NAME = 'Primary Mask'
WINDOW_DETECTION_NAME = 'Colorpicker'
def __init__(self, target=None):
parameters = ['low_h', 'low_s', 'low_v', 'high_h', 'high_s', 'high_v']
@@ -54,7 +53,6 @@ class Colorpicker(object):
else:
self.marker = None
cv2.namedWindow(self.WINDOW_CAPTURE_NAME)
cv2.namedWindow(self.WINDOW_DETECTION_NAME)
self.trackers = [
cv2.createTrackbar(
@@ -101,10 +99,10 @@ class Colorpicker(object):
)
thr = cv2.cvtColor(thr, cv2.COLOR_GRAY2BGR)
thr = self.marker.draw_last_contours(thr)
# thr = self.marker.draw_last_contours(thr)
resulting = np.concatenate((frame, thr), axis=1)
cv2.imshow(self.WINDOW_CAPTURE_NAME, resulting)
cv2.imshow(self.WINDOW_DETECTION_NAME, resulting)
# cv2.imshow(self.WINDOW_DETECTION_NAME, thr)
return cv2.waitKey(0 if manual else 50)