Answers for "tuple' object has no attribute 'shape' opencv"

0

tuple' object has no attribute 'shape' opencv

vs = cv2.VideoCapture(args["video"])
# grab the frame from the threaded video stream and resize it
# to have a maximum width of 400 pixels

_, frame = vs.read()
(w, h, c) = frame.shape

#syntax: cv2.resize(img, (width, height))
img = cv2.resize(frame,(400, h))

print(w, h)
print(img.shape)
>> 480 640
 (640, 400, 3) #rows(height), columns(width), channels(BGR)
Posted by: Guest on July-10-2020

Code answers related to "tuple' object has no attribute 'shape' opencv"

Python Answers by Framework

Browse Popular Code Answers by Language