Reputation: 63
i cant seem to resize the frame output of my ip camera opened in opencv python3
import cv2
cap = cv2.VideoCapture('rtsp://admin:[email protected]/1')
cap.set(3, 176)
cap.set(4, 144)
while(True):
ret, frame = cap.read()
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
outputting a large frame
Upvotes: 0
Views: 7994
Reputation: 487
Your issue looks very similar to other questions posted here Try to take a look on this one and see if it can helps you: similar question
Basically you must check if :
An alternative workaround, very easy but consider it as worst case, could be resize the frame after the aquisition:
success,image = cap.read()
resize = cv2.resize(image, (176, 144))
Upvotes: 2