darsia.PiecewisePerspectiveTransform#

class PiecewisePerspectiveTransform(**kwargs)[source]#

Bases: object

Globally constant, patch-wise defined perspective transform.

Store the external inputs as patches.

Parameters:
**kwargs

verbosity (int) – if greater than 0, timing statements are printed.

Methods

find_and_warp(patches, displacement[, reverse])

Continuously transform entire image via patchwise perspective transform.

find_and_warp(patches, displacement, reverse=False)[source]#

Continuously transform entire image via patchwise perspective transform.

Perspective transforms determined by the function evaluation in all corners of each patch results in continuous transformations. Hence, stiching together the transformed images results in an image without overlap and gaps.

Parameters:
patchesdarsia.Patches

Patched image.

displacementCallable

Relative deformation map; assumed to be continuous.

reversebool

Flag whether displacement is applied with negative weight.

Returns:
darsia.Image

Transformed image.