aeon.analysis.movies#

aeon.analysis.movies.averageframes(frames)[source]#

Returns the average of the specified collection of frames.

aeon.analysis.movies.collatemovie(clipdata, fun)[source]#

Collates a set of video clips into a single movie using the specified aggregation function.

Parameters:

clipdata (DataFrame)

A pandas DataFrame where each row specifies video path, frame number, clip and sequence number. This DataFrame can be obtained from the output of the triggerclip function. :param callable fun: The aggregation function used to process the frames in each clip. :return: The sequence of processed frames representing the collated movie.

aeon.analysis.movies.gridframes(frames, width, height, shape=None)[source]#

Arranges a set of frames into a grid layout with the specified pixel dimensions and shape.

Parameters:
  • frames (list) – A list of frames to include in the grid layout.

  • width (int) – The width of the output grid image, in pixels.

  • height (int) – The height of the output grid image, in pixels.

  • shape (optional)

Either the number of frames to include, or the number of rows and columns in the output grid image layout. :return: A new image containing the arrangement of the frames in a grid.

aeon.analysis.movies.gridmovie(clipdata, width, height, shape=None)[source]#

Collates a set of video clips into a grid movie with the specified pixel dimensions and grid layout.

Parameters:

clipdata (DataFrame)

A pandas DataFrame where each row specifies video path, frame number, clip and sequence number. This DataFrame can be obtained from the output of the triggerclip function. :param int width: The width of the output grid movie, in pixels. :param int height: The height of the output grid movie, in pixels. :param optional shape: Either the number of frames to include, or the number of rows and columns in the output grid movie layout. :return: The sequence of processed frames representing the collated grid movie.

aeon.analysis.movies.groupframes(frames, n, fun)[source]#

Applies the specified function to each group of n-frames.

Parameters:
  • frames (iterable) – A sequence of frames to process.

  • n (int) – The number of frames in each group.

  • fun (callable) – The function used to process each group of frames.

Returns:

An iterable returning the results of applying the function to each group.

aeon.analysis.movies.triggerclip(data, events, before=None, after=None)[source]#

Split video data around the specified sequence of event timestamps.

Parameters:

data (DataFrame)

A pandas DataFrame where each row specifies video acquisition path and frame number. :param iterable events: A sequence of timestamps to extract. :param Timedelta before: The left offset from each timestamp used to clip the data. :param Timedelta after: The right offset from each timestamp used to clip the data. :return: A pandas DataFrame containing the frames, clip and sequence numbers for each event timestamp.