0
I’ve been able to run this code before, but now it doesn’t work. It 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 code executed:
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