multissim3

Multiscale structural similarity (MS-SSIM) index for volume quality

Description

example

score = multissim3(V,Vref) calculates the MS-SSIM index, score, for volume V, using Vref as the reference volume.

The structural similarity (SSIM) index measures perceived quality by quantifying the structural similarity between a volume and a reference volume (see ssim). This function calculates the multi-scale structural similarity (MS-SSIM) index by combining the SSIM index of several versions of the volume at various scales. The MS-SSIM index can be more robust when compared to the SSIM index with regard to variations in viewing conditions.

[score,qualitymaps] = multissim3(V,Vref) also returns the local MS-SSIM index value for each pixel in V, and each of the scaled versions of V. The qualitymaps output is a cell array containing maps for each of the scaled versions of V, with each quality map the same size as the corresponding scaled version.

[score,qualitymaps] = multissim3(V,Vref,Name,Value) specifies options using one or more name-value arguments. The options control aspects of the computation. For example, use the 'NumScales' argument to specify the number of scaled versions.

Examples

collapse all

Load a 3-D volume into the workspace.

load mri D
Vref = squeeze(D);

Create a noisy version of the original volume for quality measurement comparison purposes.

V = imnoise(Vref,'salt & pepper',0.05);

Calculate the MS-SSIM index that measures the quality of the input volume compared to the reference volume.

score = multissim3(V,Vref)
score = single
    0.6293

Load a volume into the workspace. This volume will be the reference volume. Create a copy of the reference volume.

load mri D
Vref = squeeze(D);
V = Vref;

Add noise to a localized part of the volume for quality comparison purposes. Display the noisy volume.

V(1:100,1:100,1:10) = imnoise(Vref(1:100,1:100,1:10),'salt & pepper',0.05);
figure;
volshow(V);

Calculate the MS-SSIM index for the volumes and retrieve the local structural similarity maps. The multissim3 function returns qualitymaps, a cell array containing a local structural similarity map for each of the scaled versions of the volume. Display the first quality map in the cell array.

[score, qualitymaps] = multissim3(V,Vref)
score = single
    0.9124
qualitymaps=1×5 cell array
    {128×128×27 single}    {64×64×14 single}    {32×32×7 single}    {16×16×4 single}    {8×8×2 single}

figure;
volshow(qualitymaps{1});

Load a volume into the workspace.

load mri D
Vref = squeeze(D);

Create a noisy version of the volume for qualilty measurement comparison purposes.

V = imnoise(Vref,'salt & pepper',0.05);

Calculate the MS-SSIM index for the noisy volume, using the original volume as the reference. Specify how much to weigh the local MS-SSIM index calculations for each scaled volume, using the 'ScaleWeights' argument. The example uses the weights defined in the article by Wang, Simoncelli, and Bovik.

score = multissim3(V,Vref,'ScaleWeights',[0.0448,0.2856,0.3001,0.2363,0.1333]);

Load a volume into the workspace.

load mri D
Vref = squeeze(D);

Create a noisy version of the volume for comparison purposes.

V = imnoise(Vref,'salt & pepper',0.05);

Calculate the Multi-Scale Structural Similarity (MS-SSIM) index for the volume, specifying the Sigma value.

score = multissim3(V,Vref,'Sigma',1)
score = single
    0.5695

Input Arguments

collapse all

Input volume, specified as real, nonsparse, numeric array.

Data Types: single | double | int16 | uint8 | uint16

Reference volume, specified as a real, nonsparse, numeric array. The reference image must be the same size and class as the input volume.

Data Types: single | double | int16 | uint8 | uint16

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: score = multissim3(V,Vref,'NumScales',3);

Number of scales used to calculate MS-SSIM, specified as the comma-separated pair consisting of 'NumScales' and a positive integer. Setting 'NumScales' to 1 is equivalent to the use of the ssim function with the 'Exponents' name-value pair argument set to [1 1 1]. The size of the input volume limits the number of scales. The multissim3 function scales the volume (NumScales - 1) times, downsampling the volume by a factor of 2 with each scaling.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Relative values across the scales, specified as the comma-separated pair consisting of 'ScaleWeights' and a vector of positive elements. The length of the 'ScaleWeights' vector depends on the number of scales, since each element corresponds to one of the scaled versions of the original volume. The multissim3 function normalizes the 'ScaleWeights' values to 1. By default, the scale weights equal fspecial('gaussian',[1,numScales],1). The multissim3 function uses a Gaussian distribution as the default because the human visual sensitivity peaks at middle frequencies and decreases in both directions. For an example of setting 'ScaleWeights', see Calculate MS-SSIM Specifying Weights for Each Scaled Volume.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Standard deviation of isotropic Gaussian function, specified as the comma-separated pair consisting of 'Sigma' and a positive scalar. This value specifies the weighting of the neighborhood pixels around a pixel for estimating local statistics. The multissim3 function uses this weighting to avoid blocking artifacts in estimating local statistics.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Output Arguments

collapse all

MS-SSIM index, returned as a numeric scalar in the range [0, 1], where 1 corresponds to the highest quality.

Local MS-SSIM values for each pixel in each scaled version, returned as a cell array of numeric arrays. Each value in qualitymaps is a scalar value in the range [0, 1], where 1 corresponds to the highest quality.

Algorithms

The multissim3 function uses double-precision arithmetic for input volumes of class double. All other types of input volumes use single-precision arithmetic.

References

[1] Wang, Z., Simoncelli, E.P., Bovik, A.C. Multiscale Structural Similarity for Image Quality Assessment. In: The Thirty-Seventh Asilomar Conference on Signals, Systems & Computers, 2003, 1398–1402. Pacific Grove, CA, USA: IEEE, 2003. https://doi.org/10.1109/ACSSC.2003.1292216.

See Also

|

Introduced in R2020a