Vision tracking using retroreflective tape
Hello,
I am an FRC programmer, currently assigned with the task of vision processing. My team has not ever done vision processing in the past and it would be very helpful to have vision tracking done for this years challenge. Currently, I am able to take this image
and turn it into this,
import cv2
import numpy as np
vid = cv2.VideoCapture(0)
vid.set(10,.05)
while(True):
ret, frame = vid.read()
hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
lower_green = np.array([40,20,20])
upper_green = np.array([70,255,255])
mask = cv2.inRange(hsv, lower_green, upper_green)
res = cv2.bitwise_and(frame,frame,mask=mask)
cv2.imshow('orig',frame)
cv2.imshow('fff',res)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
vid.release()
cv2.destroyAllWindows()