swc.aeon.io.video#

Module for reading and writing video files using OpenCV.

swc.aeon.io.video.export(frames, filename, fps, fourcc=None)[source]#

Exports the specified frame sequence to a new video file.

Parameters:
  • frames (Iterable[Mat | ndarray]) – An object to iterate over the raw video frame data.

  • filename (str) – The path to the exported video file.

  • fps (float) – The frame rate of the exported video.

  • fourcc (int | None) – Specifies the four character code of the codec used to compress the frames.

Return type:

None

swc.aeon.io.video.frames(data)[source]#

Extracts the raw frames corresponding to the provided video metadata.

Parameters:

data (DataFrame) – A DataFrame where each row specifies video acquisition path and frame number.

Return type:

Iterable[Mat | ndarray]

Returns:

An object to iterate over numpy arrays for each row in the DataFrame, containing the raw video frame data.