Gradient Similarity (GSM)ΒΆ

Module for calculating the Gradient Similarity Metric (GSM) metric.

Examples

>>> import numpy as np
>>> from viqa import GSM
>>> img_r = np.random.rand(256, 256)
>>> img_m = np.random.rand(256, 256)
>>> gsm = GSM()
>>> gsm.score(img_r, img_m, data_range=1)

Functions

gradient_similarity(img_r, img_m[, ...])

Calculate the gradient similarity between two images.

gradient_similarity_3d(img_r, img_m[, dim, ...])

Calculate the gradient similarity (GSM) between two 3D images.

Classes

GSM([data_range, normalize])

Calculate the gradient similarity (GSM) between two images.