viqa.fr_metrics.mad.most_apparent_distortion_3d

viqa.fr_metrics.mad.most_apparent_distortion_3d(img_r: ndarray, img_m: ndarray, dim: int = 2, **kwargs: Any) float[source]

Calculate the MAD for a 3D image.

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.

  • **kwargs (optional) – Additional parameters for MAD calculation. The keyword arguments are passed to viqa.fr_metrics.mad.most_apparent_distortion().

Returns:

score_val – MAD score value as mean of MAD values of all slices of the given dimension.

Return type:

float

Raises:

ValueError – If invalid dimension given in dim.

Warning

The metric is not yet validated. Use with caution.

See also

viqa.fr_metrics.mad.most_apparent_distortion

Calculate the MAD between two images.

References