diff --git a/samples/python/tutorial_code/video/background_subtraction/bg_sub.py b/samples/python/tutorial_code/video/background_subtraction/bg_sub.py index 15330fc8b0..1bf3d2fdd8 100644 --- a/samples/python/tutorial_code/video/background_subtraction/bg_sub.py +++ b/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]