Base Streaming Camera¶
-
class
openflexure_microscope.camera.base.
TrackerFrame
(size, time)[source]¶ -
size
¶ Alias for field number 0
-
time
¶ Alias for field number 1
-
-
class
openflexure_microscope.camera.base.
FrameStream
(*args, **kwargs)[source]¶ A file-like object used to analyse and stream MJPEG frames.
Instead of analysing a load of real MJPEG frames after they’ve been stored in a BytesIO stream, we tell the camera to write frames to this class instead.
We then do analysis as the frames are written, and discard old frames as each new frame is written.
-
class
openflexure_microscope.camera.base.
BaseCamera
[source]¶ Base implementation of StreamingCamera.
-
lock
= None¶ Access lock for the camera
Type: labthings.StrictLock
-
stream
= None¶ Streaming and analysis frame buffer
Type: FrameStream
-
configuration
¶ The current camera configuration.
-
state
¶ The current read-only camera state.
-
capture
(output: Union[str, BinaryIO], fmt: str = 'jpeg', use_video_port: bool = False, resize: Optional[Tuple[int, int]] = None, bayer: bool = True, thumbnail: Optional[Tuple[int, int, int]] = None)[source]¶ Perform a basic capture to output
Parameters: - output – String or file-like object to write capture data to
- fmt – Format of the capture.
- use_video_port – Capture from the video port used for streaming. Lower resolution, faster.
- resize – Resize the captured image.
- bayer – Store raw bayer data in capture
- thumbnail – Dimensions and quality (x, y, quality) of a thumbnail to generate, if supported
-