started work on correcting HSV values

This commit is contained in:
2018-06-29 09:36:05 +02:00
parent d0a127aec0
commit 0ab0af257d
3 changed files with 21 additions and 8 deletions

View File

@@ -17,16 +17,16 @@ print('u, i, o: increase h, s, v respectively\n',
while True:
image[:] = h, s, v
im2show = cv2.cvtColor(image, cv2.COLOR_HSV2BGR)
print('HSV:', h, s, v, ' ', end='\r')
print(' HSV:', h, s, v, ' ', end='\r')
sys.stdout.flush()
cv2.imshow(window, im2show)
key = cv2.waitKey(0)
if key == ord('q'):
break
elif key == ord('u'):
h = min(h + 1, 180)
h = (h + 1) % 180
elif key == ord('j'):
h = max(h - 1, 0)
h = (h - 1) % 180
elif key == ord('i'):
s = min(s + 1, 255)
elif key == ord('k'):