darsia.EMD#

class EMD(preprocess=None, **kwargs)[source]#

Bases: object

Class to determine the EMD through cv2.

NOTE: EMD from cv2 suffers from strict memory limitations. Alternative algorithms are provided in the module :mod:wasserstein.

Parameters:
preprocesscallable(), optional

Preprocessing routine.

Methods

distance_matrix(images)

Compute the distance between each iteam of a list.

distance_matrix(images)[source]#

Compute the distance between each iteam of a list.

Parameters:
imageslist of images

N images.

Returns:
np.ndarray

N x N matrix with distances between images.