From e3856dfe5df6331a6d571890fe2872c7a04c0370 Mon Sep 17 00:00:00 2001 From: Alexander Reynolds Date: Sat, 9 Jan 2021 01:44:54 -0800 Subject: [PATCH] hotfix: call isOpened() in python bg sub tutorial https://github.com/opencv/opencv/issues/19299 --- .../python/tutorial_code/video/background_subtraction/bg_sub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]