asi_core.visualization.video

This module provides functions to create videos from all-sky images.

Attributes

OPENCV_VIDEO_CODECS

Classes

AllSkyVideo

Handles the creation of videos from all-sky images.

SaturationMaskSkyVideo

Generates videos of all-sky images with a mask overlay of saturated pixels.

Functions

create_video_from_images(images, output_path[, fps, ...])

Creates video from images.

Module Contents

asi_core.visualization.video.OPENCV_VIDEO_CODECS
class asi_core.visualization.video.AllSkyVideo(output_dir, asi_files, camera_name=None, fps=10, format='.mp4', asi_tfms=None)

Handles the creation of videos from all-sky images.

output_dir
asi_files
timestamps
camera_name = None
fps = 10
format = '.mp4'
fourcc
asi_tfms = None
sky_imager = None
update_sky_imager_config(timestamp)

Updates the sky imager configuration based on the given timestamp.

create_video(filename, timestamps=None)

Creates a video from the given image timestamps.

process_images(asi_files)

Processes images by applying transformations and preparing them for video creation.

Parameters:

asi_files – Pandas Series containing image file paths.

Returns:

List of processed images.

create_daily_videos(filename_prefix='', dates=None, num_workers=0)

Creates daily videos based on available timestamps.

Parameters:
  • filename_prefix – Prefix for the output video filename.

  • dates – List of dates to generate videos for (optional).

  • num_workers – Number of parallel workers for processing.

_create_video_task(task)

Helper method to unpack task and call create_video

class asi_core.visualization.video.SaturationMaskSkyVideo(output_dir, asi_files, camera_name, fps=10, format='.mp4', asi_tfms=None)

Bases: AllSkyVideo

Generates videos of all-sky images with a mask overlay of saturated pixels.

process_images(asi_files)

Processes images by applying a saturation mask overlay.

Parameters:

asi_files – Pandas Series containing image file paths.

Returns:

List of processed images with saturation masks applied.

asi_core.visualization.video.create_video_from_images(images, output_path, fps=10, fourcc=0, rgb_format=True)

Creates video from images.

Parameters:
  • images – list of images in numpy format.

  • output_path – path of output video.

  • fps – frames per second.