DetectorBase

class DetectorBase

Bases: pybind11_object

Base class for object detection.

This class is a generic class that can be used to detect:

  • bar codes like QRcodes of Data matrices using vpDetectorQRCode and vpDetectorDataMatrixCode classes respectively. The example given in tutorial-barcode-detector.cpp shows how to detect one or more bar codes in an image. In tutorial-barcode-detector-live.cpp you will find an other example that shows how to use this class to detect bar codes in images acquired by a camera.

  • AprilTags using vpDetectorAprilTag class

  • faces using vpDetectorFace . An example is provided in tutorial-face-detector-live.cpp.

Methods

__init__

getBBox

Return the bounding box of the ith object.

getCog

Return the center of gravity location of the ith object.

getMessage

Overloaded function.

getNbObjects

Return the number of objects that are detected.

getPolygon

Overloaded function.

setTimeout

Set detector timeout in milli-seconds.

Inherited Methods

Operators

__annotations__

__doc__

__init__

__module__

Attributes

__annotations__

__init__(*args, **kwargs)
getBBox(self, i: int) visp._visp.core.Rect

Return the bounding box of the ith object.

getCog(self, i: int) visp._visp.core.ImagePoint

Return the center of gravity location of the ith object.

getMessage(*args, **kwargs)

Overloaded function.

  1. getMessage(self: visp._visp.detection.DetectorBase) -> list[str]

Returns the contained message of the ith object if there is one.

  1. getMessage(self: visp._visp.detection.DetectorBase, i: int) -> str

Returns the contained message of the ith object if there is one.

getNbObjects(self) int

Return the number of objects that are detected.

getPolygon(*args, **kwargs)

Overloaded function.

  1. getPolygon(self: visp._visp.detection.DetectorBase) -> list[list[visp._visp.core.ImagePoint]]

Returns object container box as a vector of points.

  1. getPolygon(self: visp._visp.detection.DetectorBase, i: int) -> list[visp._visp.core.ImagePoint]

Returns ith object container box as a vector of points.

setTimeout(self, timeout_ms: int) None

Set detector timeout in milli-seconds. When set to 0, there is no timeout.