roiextract.filter.dot#

roiextract.filter.dot(sf1, sf2, normalize=True)#

Compute the dot product / cosine similarity of two spatial filters.

Parameters:
sf1SpatialFilter

The first spatial filter.

sf2SpatialFilter

The second spatial filter.

normalizebool, default=True

If True (default), calculate the cosine similarity by dividing over the norms of the spatial filters.

Returns:
dpfloat

The value of the dot product / cosine similarity.