Thursday, 19 December 2013

The Philosophy and Science of Signals

Our lives as humans are meaningful because we are constantly interacting with our environment. Ladies and gentlemen we are in dynamic equilibrium with the states of the universe which is sustained only by an influx of information from sensory receptors in our body and our capability to rationalize and respond to this stimulus, sending fresh waves of change rippling through time and space. Scientists have studied these waves of information and change over a few centuries trying to understand and manipulate them. Today we all know these waves of change as “Signals”.

The range of studies conducted on Signals are diverse. Steve Wozniak might be interested in variations of voltage and current with time in the Apple motherboard. Steve Jobs on the other hand would probably be more interested in the ‘time-series’ of stock prices of Apple which are yet another type of discrete-time signals. Siri is obsessed with speech signals i.e. the variation of voice amplitude over time. And I am a fan of motion pictures which are variations in pixel intensities over both time and space (since any snapshot at a given time is an image which can be looked at as variation of pixel values over the span of the display screen). 

Interestingly computers can be taught to analyse signals to extract the required information and this is a common theme that runs along all problems studied under the broad domain of Signal Processing. Just like food processing is important to convert raw food into edible form before it can be cooked, Signal Processing is important to reduce complex signals into rudimentary forms which can be consumed by the limited intelligence and rationale that computers possess. 

For example, say a satellite picture of region around the Pantheon in Rome (a top view) is to be used to automatically register the total built up area i.e. the floor area occupied by all the buildings in the image. A possible way to tackle the problem is to write a computer program to detect the edges in the image and assuming that the edges corresponding to the view of the rooftops of the building would form closed loops, the program could simply count the number of pixels completely enclosed by loops. In this problem the method of detecting an edge is studied under Image Processing which forms a part of the algorithm for the task of inferring the built up area which is of interest to a researcher in Computer Vision.

Smoothing the image while preserving edge information using Perona-Malik Diffusion

Edge Detection applied to the diffused image using Canny Edge Detection Algorithm
This doesn't look simple and it isn't :p (I love this tongue-sticking-out smiley). Edge detection is done in 2 steps because if Canny edge detection is used on the original image directly then a lot of unnecessary edges are captured which may make the task even more difficult. Thus the image is first smoothed out using a sophisticated algorithm known as Anisotropic Diffusion developed by and named after Pietro Perona (Professor and Computer Vision Researcher at Caltech) and Jitendra Malik (Professor and Computer Vision Researcher at UC, Berkeley). Further as can be seen from the edges detected, our assumption about the loops being closed doesn't hold in many places and it is the job of a Computer Vision researcher to either work his way around this problem or improve the algorithm for edge detection or both.

This example clearly elucidates the dependence of Computer Vision on Signal Processing, especially Image Processing. There are other challenges involved too. For instance, the process of image acquisition by the satellite and transmission to the base station on the ground adds some noise which are random variations that corrupt the original signal. Noise is the manifestation of the imperfect world we live in. Noise removal is a pre-processing step in many applications including the one in question. All is well and good while there is sunshine and a clear sky, but what if clouds come in between the Pantheon and the satellite? That would be hilarious wouldn't it :p ?

Fortunately, Signal Processing deals with techniques that can filter out these unwanted additions to our good old signal like noise and cloud cover (yes! you can look through the clouds) and hence these methods are aptly called Filtering techniques. They come in varying degrees of complexity and applicability.

If you are as excited as I am, then watch out for my next post where we will explore a fundamental concept in Signal Processing and see how it can help us in noise removal in simple 1-D signals.

Guys and girls, please feel free to leave behind a comment. Older people, who don't think they fit into the category of guys and girls, need not refrain from doing so either :-) .

Code for Anisotropic Diffusion and Canny Edge Detection in Matlab