viqa.fr_metrics.gsm.gradient_similarity_3d

viqa.fr_metrics.gsm.gradient_similarity_3d(img_r, img_m, dim=0, experimental=False, **kwargs)[source]

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

Parameters:
  • img_r (np.ndarray) – Reference image to calculate score against

  • img_m (np.ndarray) – Distorted image to calculate score of

  • dim ({0, 1, 2}, default=2) – Dimension on which the slices are iterated.

  • experimental (bool, default=False) –

    If True, calculate GSM for the full volume with experimental 3D kernels. If False, calculate GSM for all slices of the given dimension and calculate mean over all single slice values.

    Attention

    This is experimental and the resulting values are not validated.

  • **kwargs (optional) – Additional parameters for GSM calculation. The keyword arguments are passed to viqa.fr_metrics.gsm.gradient_similarity().

Returns:

gsm_score – GSM score value.

Return type:

float

Raises:

ValueError – If the dim is not an integer of 0, 1 or 2.

Warning

This metric is not yet tested. The metric should be only used for experimental purposes.

See also

viqa.fr_metrics.gsm.gradient_similarity

Calculate the gradient similarity between two images.

References