I've a program for image steganography where text is hidden in images. What are the ideal values for PSNR(Power signal noise ratio) and MSE(Mean square Error) and how to calculate PSNR and MSE values?
1 Answer
Well to keep it simple, we could assume a basic raster format such as bmp
. We could then aim for 1 bit of hidden information per pixel per 8 bit channel. I have also assumed that the signal is the message and the noise is the image, hence the negative signum as:-
$$ \text{SNR} = 20 \log \left (\frac{1}{2^8} \right) = -48 \text{ dB} $$
MSE is hard as what is your predictor in this situation? Trying to replicate the original noise inherent within the raster? All I think we can say is that the original least significant bit (LSB) will be uniformly random(ish). And the LSB of your (encrypted) message will also be uniformly random. Given that, if the encryption algorithm is the predictor, it will be correct 50% of the time with the expected bit value $E(\overline{X}) = 0.5$. So,
$$ \text{MSE} = \frac{0.5^2}{n} $$
where $n$ is the number of channels times raster size in pixels. Also knowing that the standard deviation of a random one bit sequence is 0.5. But I don't think that MSE in this situation is particularly informative.