modified scripts for presentation

This commit is contained in:
2018-07-05 10:42:05 +02:00
parent f89864c0e4
commit 4b926bed19
8 changed files with 60 additions and 17 deletions

View File

@@ -5,6 +5,7 @@ import json
import argparse
import cv2
import numpy as np
from .imagereaders import VideoReader, NaoImageReader, PictureReader
from .finders import GoalFinder, BallFinder, FieldFinder
@@ -99,9 +100,12 @@ class Colorpicker(object):
tuple(map(self.settings.get, ('high_h', 'high_s', 'high_v')))
)
cv2.imshow(self.WINDOW_CAPTURE_NAME, frame)
cv2.imshow(self.WINDOW_DETECTION_NAME, thr)
return cv2.waitKey(0 if manual else 1)
thr = cv2.cvtColor(thr, cv2.COLOR_GRAY2BGR)
resulting = np.concatenate((frame, thr), axis=1)
cv2.imshow(self.WINDOW_CAPTURE_NAME, resulting)
# cv2.imshow(self.WINDOW_DETECTION_NAME, thr)
return cv2.waitKey(0 if manual else 50)
def save(self, filename, color):
try: