fast::MeanSquaredError class

Mean squared error (MSE) of two input images.

MSE is calculated as: \text{MSE} = \sum_i^N (I_1(\vec x_i) - I_2(\vec x_i)^2

Multi-channel and 3D images are supported. In this case an MSE value is calculated per channel, and the final MSE value is the average of all channel MSE values.

Inputs:

Outputs:

  • 0: Squared difference image
  • 1: Float scalar, MSE value

Base classes

class ProcessObject
Abstract base class for all process objects.

Derived classes

class PeakSignalToNoiseRatio
Peak Signal-To-Noise-Ratio (PSNR) of two input images.

Public functions

auto get() const -> float
Create instance.

Protected functions

auto calculateSquaredDiffImage(std::shared_ptr<Image> image1, std::shared_ptr<Image> image2) -> std::shared_ptr<Image>
auto calculateMSE(std::shared_ptr<Image> image) -> float

Protected variables

float m_value

Private functions

void execute() override

Function documentation

float fast::MeanSquaredError::get() const

Create instance.

Returns instance

Get MSE value of last run