ImageSink

class cscore.ImageSink

Bases: VideoSink

A base class for single image reading sinks.

getError() str

Get error string. Call this if WaitForFrame() returns 0 to determine what the error is.

setDescription(description: str) None

Set sink description.

Parameters:

description – Description

setEnabled(enabled: bool) None

Enable or disable getting new frames.

Disabling will cause processFrame (for callback-based CvSinks) to not be called and WaitForFrame() to not return. This can be used to save processor resources when frames are not needed.