Computes the mean-squared error for each component based on two input images.

HRESULT ComputeMSE( _In_ const Image& image1, _In_ const Image& image2,
    _Out_ float& mse, _Out_writes_opt_(4) float* mseV,
    _In_ DWORD flags = 0 );

Parameters

flags: a combination of the following flags mse: The sum of the channel mean-squared error.

mseV: Points to an array of 4 floats which holds the individual channel mean-squared error. Can be nullptr.

Remarks

Image data is converted to DXGI_FORMAT_R32G32B32A32_FLOAT for this operation. BC data is automatically decompressed.

This function cannot operate directly on a planar format image. See ConvertToSinglePlane for a method for converting planar data to a format that is supported by this routine.