opencv3.0 - Why Python says "'int' object is not callable"? -
i'm trying execute code , interpreter says this. error?
import cv2 videocapture = cv2.videocapture('opal.avi') fps = videocapture.get(cv2.cap_prop_fps) size = (int(videocapture.get(cv2.cap_prop_frame_width)), int(videocapture.get(cv2.cap_prop_frame_height))) videow = (cv2.videowriter('opal2.avi', cv2.cap_prop_fourcc('i', '4', '2', '0'), fps, size)) success, frame = videocapture.read() while success: # loop until there no more frames. videow.write(frame) success, frame = videocapture.read()
the line cv2.cap_prop_fourcc('i', '4', '2', '0') generate error.
cap_prop_fourcc constant, ie int.
you can't call int
3("hello") => impossible "int" object not callable
Comments
Post a Comment