Skip to content

Background subtractor python tutorial does not call isOpened() method #19299

@alkasm

Description

@alkasm
Detailed description

The Python background subtractor tutorial attempts to check that the capture device is opened with:

if not capture.isOpened:
    ...

Instead the method needs to be called:

if not capture.isOpened():
    ...

Currently, it will always be true since the value is a function which is always truthy.

Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    answers.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions