# Performance metrics for image steganography

• Last Updated : 28 Oct, 2021

Overview :
Various methods are used to evaluate the quality of image steganography. Each of these methods assesses a different aspect of the result obtained after steganography. Some of the well-known methods are Mean Square Error(MSE), Peak Signal to Noise Ratio(PSNR), Structured Similarity Index Measure(SSIM), Payload Capacity.

Payload capacity refers to the measure of the volume of information present within the cover image. This measure is important in a steganographic system as the communication overhead depends on the maximum payload capacity. It is measured in Bits Per Pixel(BPP).

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

`BPP = NUMBER OF SECRET BITS EMBEDDED/ TOTAL NUMBER OF PIXELS`

Mean Square Error(MSE):
Mean Square Error is the averaged value of the square of the pixel-by-pixel difference between the original image and stego-image. It gives us a measure of the error produced in the cover image due to the data embedding process.

`MSE=(mxn)-1∑mi=1 ∑ni=1I[I(i,j)-k(I,j)]2`

Description –
A lower value of MSE indicates a good quality embedding.

```m,n = Dimensions of the image
I   = Original Image
K   = stego-image```

Peak Signal to Noise Ratio(PSNR)
PSNR is another popular way to measure the degree of distortion in the cover image due to embedding.  It is the ratio between the maximum possible value of a signal and the power of distortion noise(MSE). It is measured in dB’s. A higher value of PSNR indicates a better quality embedding.

`PSNR = 10xlog(MAX2/MSE)`

Description –

`MAX = 255 for a 8-bit grayscale image`

Structured Similarity Index Measurement(SSIM)
SSIM is a metric of comparison to check the similarity between the cover image and stego-image. It measures the perceptual difference between the two images.

`SSIM=(2μxμy + c1)(2σxy +c2)/((μx)2+(μy)2 +c1)((σx)2 +(σy)2 + c2)`

Description –

```c1 = (k1l)2
c2 = (k2l)2

μx  and μy  are the mean intensity values of images x and y.

(σx)2  is the variance of x,
(σy)2  is the variance of y
(σxy)2 is the covariance of x and y.

c₁ and c₂ are the two stabilizing parameters,
L is the dynamic range of pixel values (2#bits per pixel - 1)
the contents k1=0.01 and k2=0.03.
SSIM value close to 1 indicates good quality.```
My Personal Notes arrow_drop_up