class frc_apriltags.Streaming(camNum: int, path: str = None, resolution: tuple = (640, 480), fps: int = 15)

Bases: object

Use this class to stream unprocessed images to the driver station.

Parameters:
  • camNum – The camera number.

  • path – Can be found on Linux by running find /dev/v4l.

  • resolution – Width by height.

  • fps – Frames per second.

enableLogging()

Enables logging for this class.

getStream()

Grabs a frame from the stream.

Returns:

A frame.

prealocateSpace()

Prealocates space for the stream.

Returns:

An array of zeros with the same resolution as the camera.

streamImage(image)

Streams the camera back to ShuffleBoard for driver use.

Parameters:

img – A processed stream.

Returns:

The processed stream.