Fundamentals of Image Processing demystified! Contd...

Hey again! 
Starting from where I left...

Transform: What is a transform? Yes, you are right it changes a system/signal from one domain to other but that is actually a transformation process. A transform is simply a linear operator. By saying linear it just means that the signal should not change when you view it in other domain. It's like I go from one room to other, though the room is different but I'm the same. Why is a transformation necessary? Because it segregates the frequency which helps to understand the signal more. If a transformation process exists then it's inverse should also exist, i.e. if I go from my room to other room, I should also be able to come back to my room with me being the same throughout. Let me write down some transformation equations:
What do you understand by these three equations? Let me explain you in a dramatic way :P I'm a Mumbaikar and Mumbai is my main domain where I know to manage out everything independently. This is what is f(t) in time domain. If by flight/train or any such means I go to Bangalore, now this is a new place to me and I know nothing here so I'm dependent on someone. If this someone is of a higher authority I stand no chance of enjoying my freedom and would have to adjust myself accordingly. To draw an analogy, flight/train is the transform used, Bangalore is the transformed domain and that someone of higher authority is the exponential function. As I lose my freedom, same way the function looses its time characteristics compared to the huge exponential signal (the rhs of the equation has no time functions). Now why choose an exponential signal? It is so because it is composed of cos and sin signals which are known signals, like the authority who will be my point of contact in Bangalore would be someone known to me. This opens something for us to think...is loosing time going to be good? Just go through the following scribble:
We observe three different signals but taking their Fourier Transform gives us exactly the same frequency composition. This simply happens because in the frequency domain you don't get the feel of time. But in time domain you don't get the feel of frequency as well. So we are in a fix and are not able to figure out which is the original signal from its fourier transform. Coming back to the exponential signal or that someone of higher authority, what if now that someone is having less authority than you, so in such case you can still enjoy your freedom or in this context by making the time of the exponential signal finite, the time characteristics can still be retained now. This is what is STFT-Short time fourier transform. So There is only a minor difference between STFT and FT. In STFT, the signal is divided into small enough segments, where these segments (portions) of the signal can be assumed to be stationary. For this purpose, a window function "w" is chosen. The width of this window must be equal to the segment of the signal where its stationarity is valid. Difference in the equations reflecting this change would be just by replacing 't' by 't-t0' in the exponential power i.e. making the time finite. 

Let's observe one more interesting thing here. We know if we use a window of infinite length, we get the FT, which gives perfect frequency resolution, but no time information. So, 
Wide window ===>good frequency resolution, poor time resolution. 
Narrow window ===>good time resolution, poor frequency resolution.
Let us see that for ourselves below. Here we have taken a non-stationary signal with four different frequency components at different times. 

Now, let's look at its STFT and we find that these four peaks are located at different time intervals
along the time axis. 

The following figure shows four window functions.  I will now show the STFT of the same signal given above computed with these windows. 

First let's look at the first most narrow window. We expect the STFT to have a very good time resolution, but relatively poor frequency resolution and we note that the four peaks are well separated from each other in time. 

Now let's take a wider window:

Even wider:

Note that the peaks are not well separated from each other in time, however, in frequency resolution is much better. Another thing we can infer is that low frequency signals are better resolved when the window function is wider as then we get more frequency resolution and less time resolution while the high frequency signal is better resolved when the window function is narrower as for high frequency i.e fast changing signal a better time resolution is necessary. 


These examples should have illustrated the implicit problem of resolution of the STFT. Anyone who would like to use STFT is faced with this problem of resolution. What kind of a window to use? 

To again make the problem of resolution clear, one cannot know the exact time-frequency representation of a signal, i.e., one cannot know what spectral components exist at what instances of times. What one can know are the time intervals in which certain band of frequencies exist, which is a resolution problem.  The Wavelet transform (WT) solves the dilemma of resolution to a certain extent. I'm not taking details of wavelet transform in this blog though I have already given an idea of it towards the end of my first blog on Neural Networks. 

Digital Filters: The last topic of this discussion. Designing the right filter is very important for any application, and we all realise this. This is again a very huge topic but I'll just summarise it in the following charts. 

It is very good to know everything in depth for designing a filter by various methods (I haven't explained the methods here, just mentioned them above) because that will only allow us to grasp or visualise any problem and get us the right solution to it, though all these methods are just direct functions in any toolbox so you don't need to sit and design these algorithms, all you must know is when and where to use which method. So reading about the filter design frameworks and the different methods for both FIR and IIR from any standard DSP text book would be helpful now. 

With this I wrap up the topic and I hope you were able to follow me throughout this blog and the previous blog. :)
  
  
  


No comments:

Post a Comment

My first Code-along workshop

I had one of the most satisfying Saturday last weekend and that feeling is the reason I'm writing a blog after almost a year. I often...