I've been able to run this code before, but now it does not work. He needs to draw a square on the video screen.
Error:
Traceback (most recent call last): File "/home/ggoulart/PycharmProjects/INTPYT_HandTracker/Main.py", line 13, in cv2.rectangle (gray, 100, 100, (0.255.0), 3) SystemError: new style getargs format but argument is not a tuple
And the executed code:
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
# Loop
while (1):
_, frame = cap.read()
gray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
cv2.rectangle(gray, 100, 100, (0,255,0), 3)
cv2.imshow('Test',gray)
k = cv2.waitKey(100)
if k == 27:
break
cap.release()
cv2.destroyAllWindows()
Additional information:
OpenCV version: 3.x
Host OS: Linux (Fedora 23)
Compiler & CMake: GCC 5.3 & CMake 3.5