hotfix: call isOpened() in python bg sub tutorial

https://github.com/opencv/opencv/issues/19299
pull/19300/head
Alexander Reynolds 4 years ago committed by Alexander Reynolds
parent 62420b900e
commit e3856dfe5d
  1. 2
      samples/python/tutorial_code/video/background_subtraction/bg_sub.py

@ -18,7 +18,7 @@ else:
## [capture]
capture = cv.VideoCapture(cv.samples.findFileOrKeep(args.input))
if not capture.isOpened:
if not capture.isOpened():
print('Unable to open: ' + args.input)
exit(0)
## [capture]

Loading…
Cancel
Save