boilercv_pipeline.captivate.captures

boilercv_pipeline.captivate.captures#

Image and video capturing.

Module Contents#

Functions#

write_video

Write a video to disk with the default filetype and timestamp.

write_image

Write an image to disk with default filetype.

coerce_input

Coerce input image or video to the appropriate type.

API#

boilercv_pipeline.captivate.captures.write_video(
path: pathlib.Path,
video: boilercv.types.Vid | boilercv.types.VidBool | boilercv.types.DA,
framerate: int = FRAMERATE_CONT,
preview_frame: bool = False,
)#

Write a video to disk with the default filetype and timestamp.

Args: path: Path to the video file (suffix coerced to ‘.mp4’). video: Data structure to write as a video. framerate: Frames per second. Default: Package default framerate. preview_frame: Write the first frame to disk as an image. Default: False.

boilercv_pipeline.captivate.captures.write_image(
path: pathlib.Path,
image: boilercv.types.Img | boilercv.types.ImgBool | boilercv.types.DA,
)#

Write an image to disk with default filetype.

Args: path: Path to the image file (suffix coerced to ‘.png’). image: Data structure to write as an image.

boilercv_pipeline.captivate.captures.coerce_input(
imgs: boilercv.types.Img | boilercv.types.ImgBool | boilercv.types.DA,
) boilercv.types.Img#

Coerce input image or video to the appropriate type.

Args: imgs: Image or video to coerce.