We have proposed and simulated an LSB insertion method that does 10% less bits changes then the regular LSB. However to our surprise the PSNR value of the proposed method is very close to the regular LSB ( around ~1% increase )
It is really confusing as our proposed method does less LSB changes but the PSNR value is still the same. Would appreciate any help.
We are using Matlab and testing on RGB image ( embeding on LSB of all three RGB channels )
I think your results are not unexpected and that you're probably overestimating the effect because PSNR is a logarithmic function. I will plug in some numbers to show you that effect, but I will make some assumptions about details you haven't mentioned.
I assume that you embed only 1 bit per pixel and that is in the least significant bit and not in the 2nd, 3rd or any other.
What this means is that if a bit flips, the square error between the original and the modified pixel is 1. If we assume a stream of random bits, we expect to change half of the pixels where we embed our information. All of this can be encapsulated in the following two functions.
mse = @(bits, x, y) (0.5 * bits) / (x * y)
psnr = @(signal, noise) = 10 * log10(signal^2 / noise)
Where bits
is the total number of embedding bits, x
and y
the size of the image, signal
is the maximum intensity value in the original image (I used 255) and noise
is the mse.
Let's assume a 512x512 image. For simplicity, let's also calculate the PSNR for only one colour component.
5,000 bits: 68.3368 db
4,500 bits: 68.7944 db
PSNR increase: 0.6696%
100,000 bits: 55.3265 db
90,000 bits: 55.7841 db
PSNR increase: 0.8271%
In fact, you can derive a general symbolic form.
mse_orig = (bits / 2) / (x * y) = bits / (2 * x * y)
mse_steg = (0.9 * bits / 2) / (x * y) = 0.9 * mse_orig
psnr = 10 * log10(signal^2 / mse)
percent_change = 100 * (psnr_steg - psnr_orig) / psnr_orig
By using the property log(a / b) = log(a) - log(b)
, the above can be simplified to:
percent_change = 100 * (-log10(0.9) / log10(2* x * y * signal^2 / bits))
Where bits
is the number of bits you embed with regular lsb embedding (i.e., 5,000 and NOT 4,500).