Resize#

class deeptrack.math.Resize(dsize: tuple | Callable[[...], tuple] = (256, 256), **kwargs)#

Bases: Feature

Resize an image. This is a wrapper around cv2.resize and takes the same arguments. Note that the order of the axes is different in cv2 and numpy. In cv2, the first axis is the vertical axis, while in numpy it is the horizontal axis. This is reflected in the default values of the arguments.

Parameters#

sizetuple

Size to resize to.

Methods Summary

get(image, dsize, **kwargs)

Transform an image [abstract method].

Methods Documentation

get(image, dsize, **kwargs)#

Transform an image [abstract method].

Abstract method that defines how the feature transforms the input. The current value of all properties will be passed as keyword arguments.

Parameters#

image‘Image’ or List[‘Image’]

The Image or list of images to transform.

**kwargsDict[str, Any]

The current value of all properties in properties as well as any global arguments.

Returns#

‘Image’ or List[‘Image’]

The transformed image or list of images.

Raises#

NotImplementedError

Must be overridden by subclasses.