discopat.core.entities.frame

Classes

Frame(name, width, height, annotations[, ...])

Class to model movie frames or images.

class discopat.core.entities.frame.Frame(name, width, height, annotations, image_array=None)[source]

Bases: Metadata

Class to model movie frames or images.

Parameters:
  • name (str)

  • width (int)

  • height (int)

  • annotations (list[Annotation])

  • image_array (Array)

classmethod from_dict(data_as_dict)[source]

Make object from a dictionary.

Parameters:

data_as_dict (dict)

Return type:

Self

classmethod printable_fields()[source]

List of the relevant fields to serialise the object.

Return type:

list[str]

resize(target_width, target_height)[source]

Resize the image to (target_width, target_height).

Parameters:
  • target_width (int)

  • target_height (int)

Return type:

None

to_dict()[source]

Serialise object to a dictionary.

Return type:

dict