Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def init(self): # TODO: init or __init__?
if (self.live == 1):
self.icam = py.InstantCamera(py.TlFactory.GetInstance().CreateFirstDevice())
self.icam.Close()
self.icam.RegisterConfiguration(
py.AcquireContinuousConfiguration(),
py.RegistrationMode_ReplaceAll,
py.Cleanup_Delete
)
self.icam.Open()
self.icam.PixelFormat = "RGB8"
self.icam.MaxNumBuffer = 50
#self.icam.MaxNumBuffer = 2000
pass
else:
self.cap = cv2.VideoCapture('video.avi')