btb.libcamera package

Submodules

btb.libcamera.camera module

synopis:

Convenience wrapper for camera functionality.

class btb.libcamera.camera.Camera(input, output, resolution, fps, brightness, detector)[source]

Bases: object

Camera module for computer vision with several variable options.

Parameters:
  • input (str) – Path to input if using a file. If using camera use 0.

  • output (str) – Path to output file generated with image detection rectangle overlay.

  • resolution (int) – Resolution to use for camera/ouput. (ex: 144, 240, 360, 720, 1080).

  • fps (int) – Frames per second.

  • brightness (int) – Brightness as a whole number percentage. (ex 50, 100, 15).

  • detector (str) – Cascade classifier detector xml file.

coordinates()[source]

Finds image of interest within a frame returns the coordinates.

Returns:

Coordinates of the image of interest.

present() bool[source]

Determines if the image of interest is present on the current frame of the image.

Returns:

True if a the image of interest was detected or not.

Return type:

bool

Module contents