MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today
Asked by FIR on 21 Dec 2012

i have a equation below please tell how to find MSE and MAE for RGB image

*No products are associated with this question.*

Answer by Walter Roberson on 21 Dec 2012

Accepted answer

To within a constant factor that might depend upon image size,

MSE = sum( (FirstImage(:) - SecondImage(:)).^2 );

Show 5 older comments

Walter Roberson on 21 Dec 2012

As the document indicates, `|x|` with a subscript of 2 corresponds to the L2 normal, which is the Euclidean Norm, also known as Euclidean distance. The Euclidean distance is like sqrt( (x1-x2)^2 + (y1-y2)^2) and so on. Notice that in the formula given, they square this value -- that is what the superscript 2 is about, squaring the result of the Euclidean distance. The squaring cancels out the sqrt(), leaving (x1-x2)^2 + (y1-y2)^2

The `|x|` with a subscript 1 is the L1 norm, also known as the taxicab distance or the Manhattan norm. This corresponds to `x1-x2` + `y1-y2` with no sqrt(). Notice though that in the formula they do *not* square this, leaving `x1-x2` + `y1-y2`, abs(x1-x2) + abs(y1-y2)

## 0 Comments