Commit 559f5505 authored by Robozman's avatar Robozman

Added WIP opencv testbed

parent ca1e90d4
......@@ -3,15 +3,26 @@ import cv2
cap = cv2.VideoCapture(0)
foo = True
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
hsv_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
h, s, v = cv2.split(hsv_frame)
v = np.where(True, v * 0 + 150, v * 0 + 150)
final_hsv = cv2.merge((h, s, v))
img = cv2.cvtColor(final_hsv, cv2.COLOR_HSV2BGR)
# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Our operations on the frame come here
#gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
#kernel = np.ones((8,8),np.float32)/64
##blur = cv2.blur(frame,(10,10))
#dst = cv2.filter2D(frame,-1,kernel)
# Display the resulting frame
cv2.imshow('frame', gray)
cv2.imshow('frame', img)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment