vpi.Pyramid

class vpi.Pyramid(size: Tuple[int, int], format: vpi.Format, levels: int, scale: float = 0.5) vpi.Pyramid

Create an empty pyramid instance.

Parameters
  • size (Tuple[int, int]) – Dimensions (width, height) of the finest pyramid level.

  • format (vpi.Format) – Image format of each level.

  • levels (int) – The number of levels in the pyramid.

  • scale (float) – Scale factor from one level and the next.

Returns

The pyramid.

Return type

vpi.Pyramid

Hint

The contents of a pyramid instance can be accessed via container methods.

Attributes

format

Format of all images in the pyramid.

height

Height of the finest pyramid level.

id

Index (sequential number) of the instance.

levels

The number of levels in the pyramid.

scale

The scale factor from one level and the next.

size

Size of the finest pyramid level as a tuple of (width, height).

sizes

Sizes of all pyramid levels as a list of tuples of (width, height).

width

Width of the finest pyramid level.