In Image processing, we often use Signal to Noise Ratio (SNR) and Peak Signal to Noise Ratio (PSNR) for quality measurement.
Discrete signal power is defined as Let us now interpret this result. This is the ratio of the power of signal to the power of noise. Power is in some sense the squared norm of your signal. It shows how much squared deviation you have from zero on average. You should also note that we can extend this notion to images by simply summing twice of rows and columns of your image vector, or simply stretching your entire image into a single vector of pixels and apply the one-dimensional definition. You can see that no spacial information is encoded into the definition of power. Now let's look at peak signal to noise ratio. This definition is If you stare at this for long enough you will realize that this definition is really the same as that of Now, why does this definition make sense? It makes sense because the case of SNR we're looking at how strong the signal is to how strong the noise is. We assume that there are no special circumstances. In fact, this definition is adapted directly from the physical definition of electrical power. In case of PSNR, we're interested in signal peak because we can be interested in things like the bandwidth of the signal, or number of bits we need to represent it. This is much more content-specific than pure SNR and can find many reasonable applications, image compression being on of them. Here we're saying that what matters is how well high-intensity regions of the image come through the noise, and we're paying much less attention how we're performing under low intensity. |
Showing posts with label BASICS. Show all posts
Showing posts with label BASICS. Show all posts
Sunday, November 17, 2013
Difference between SNR and PSNR
What is Time domain and Frequency domain?
Time/Frequency are interrelated parameter of a signal and both representations are two views of a same signal. Most of the time in practice, the signal measuring, is a
function of time. That is TIME-DOMAIN. In other words, when we plot the signal one of the axes is
time (independent variable), and the other (dependent variable) is usually the
amplitude. When we plot time-domain signals, we obtain a time-amplitude
representation of the signal.
This representation is not always the best
representation of the signal for most signal processing related applications.
In many cases, the most distinguished information is hidden in the frequency
content of the signal. The frequency SPECTRUM of a signal is basically
the frequency components (spectral components) of that signal. The frequency
spectrum of a signal shows what frequencies exist in the signal. The below represents a signal in time domain and frequency domain.
Demo :
In the above demo :
Red Color --- TIME DOMAIN SIGNAL
Blue Color --- FREQUENCY DOMAIN SIGNAL
MATLAB Code:
clear all; clc; close all; f=50; A=5; Fs=f*100; Ts=1/Fs; t=0:Ts:10/f; x=A*sin(2*pi*f*t); x1=A*sin(2*pi*(f+50)*t); x2=A*sin(2*pi*(f+250)*t); x=x+x1+x2; % Creating Hybrid signal which will have more than 1 frequency. plot(x) F=fft(x); figure N=Fs/length(F); baxis=(1:N:N*(length(x)/2-1)); plot(baxis,real(F(1:length(F)/2)))
Subscribe to:
Posts (Atom)