Skip to content

Generalize video and image capture #3

@blakeNaccarato

Description

@blakeNaccarato

The captures module currently serves boilercv with some module-level constants as defaults and a particular filename scheme. Generalize this approach somewhat, while keeping some sensible defaults (e.g. video format).

  • Optimize scale_bool and determine when it is necessary
  • Generalize file writing for only MP4 (pyav plugin), TIFF (tifffile_v3 plugin), and PNG (Pillow plugin). Use the v3 API and imopen in the refactor. Allow arguments to be passed through to override behavior, but choose reasonable defaults.
  • Do not manipulate paths by default, nor append timestamps. Just raise on improper extension/setting combinations
  • Generalize preview_frame behavior to preview arbitrary frames
  • Handle boolean-valued arrays consistently in previewing/capturing with scale_bool
  • Factor out common compositions of previews/captures to a third module. For example, previewing and capturing at once
  • Implement import-time configuration by the consumer with preview/capture flags

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions