I am trying to calculate SNR between my original image and stego image (in which secret message is embedded)
I am using gray scale image for implementation. I am calculating it following way but SNR coming as -ve..
Please correct me if i am doing anything wrong here for images
function snr_power = SNR(signal, noise)
% SNR (Signal to noise ratio)
[signalRowSize signalColSize] = size(signal);
[noiseRowSize noiseColSize] = size(noise);
signalAmp = signal(:);
noiseAmp = noise(:);
signalPower = sum(signalAmp.^2)/(signalRowSize*signalColSize);
noisePower = sum(noiseAmp.^2)/(noiseRowSize*noiseColSize);
% snr_amp = 10*log10((signalAmp./noiseAmp)^2);
snr_power = 10*log10(signalPower/noisePower);
end
stego_image = original_image + noise
, you can solve for noise = stego_image - original_image
Ben Voigt 2012-04-05 16:51
An object is visible in an image because it has a different brightness than its surroundings.
That is, the contrast of the object (i.e., the signal) must overcome the image noise. See Image. The grayscale transform can be used to boost the contrast of a selected range of pixel values, providing a valuable tool in overcoming the limitations of the human eye. The contrast at one brightness level is increased, at the cost of reducing the contrast at another brightness level. However, this only works when the contrast of the object is not lost in random image noise. This is a more serious situation; the signal does not contain enough information to reveal the object, regardless of the performance of the eye.
Find in detail here
signal
and what isnoise
? Is it the original image, the secret data, the image merged with the data - Ben Voigt 2012-04-05 16:42