ifm3dpy.framegrabber.Frame

class ifm3dpy.framegrabber.Frame

Bases: object

Represent a frame of data received from the the device.

Methods

frame_count(self)

Get the frame count according to algorithm output

get_buffer(self, id[, index])

Get the buffer with the given id

get_buffer_count(self, id)

Get the total number of image with the given id

get_buffers(self)

Get the list of available buffers

has_buffer(self, id)

Check if a buffer with the given id is available in this frame

timestamps(self)

Get the timestamps of the frame

frame_count(self: Frame) int

Get the frame count according to algorithm output

get_buffer(self: Frame, id: buffer_id, index: int = 0) Buffer

Get the buffer with the given id

Parameters
  • id (ifm3dpy.framegrabber.buffer_id) – The id of the buffer to retrieve

  • index (int) – The index of the buffer, for buffer ids which are received more than once per frame

Returns

The image data as a numpy.ndarray subclass, carrying the buffer metadata and its buffer_id

Return type

ifm3dpy.Buffer

Raises

RuntimeError – If no buffer with the given id is part of this frame

get_buffer_count(self: Frame, id: buffer_id) int

Get the total number of image with the given id

get_buffers(self: Frame) list[buffer_id]

Get the list of available buffers

has_buffer(self: Frame, id: buffer_id) bool

Check if a buffer with the given id is available in this frame

timestamps(self: Frame) list[datetime]

Get the timestamps of the frame