class CamBlobsPipe

class scTDC.CamBlobsPipe(device)

A pipe for reading camera blob data synchronously. Do not instantiate this class by hand. Use Camera.add_blobs_pipe, instead.

is_active()

Query whether the pipe is active / open.

Returns

True if the pipe is active.

Return type

bool

close()

Close the pipe, release memory associated with the pipe

read(timeout_ms=500)

Wait until blob data for the next camera frame becomes available or timeout is reached and read it. Returns blob data of the next camera frame. If data is returned, access is only allowed until the next time that this read function is called. Perform a copy of the data if you need to keep it for longer. As soon as a CamBlobsPipe is opened and measurements are started, the pipe allocates memory for storing data which is released by reading. Not reading the pipe frequently enough can exhaust the memory.

Parameters

timeout_ms (int, optional) – the timeout in milliseconds, defaults to 500

Returns

Returns an array of blob positions in case of success. If an error occurs, returns a tuple (error_code, error_message).

Return type

numpy.ndarray | (int, str)