Sunday, July 9, 2017

image processing - How to Extract High Frequency and Low Frequency Component Using Bilateral Filter?


What does High frequency and low frequency component signify in an image. How to separate out the high frequency as well as low frequency component of an image using Bilateral filter.



Answer




Similar to one dimensional signals, low frequencies in images mean pixel values that are changing slowly over space, while high frequency content means pixel values that are rapidly changing in space.


For example, the following image has strong low frequency components: You can intuitively see how I simply have a sin-wave propagating at some low frequency. enter image description here


In contrast, this image below is composed of a sin wave at double the above frequency. Notice how this manifests itself on the image:


enter image description here


Any image can have any number of low and high frequency components together as well. For example, and image like this has both low and high frequency components:


enter image description here


You can see how you have a low-frequency 'trend', but also a lot of high frequency detail across the image. (Roughly speaking, in images, sharp transients like edges correspond to high frequencies, while long unchanging spaces correspond to low frequencies).


So now, the point of an application of a bilateral filter (which is simply a convolution of your image with a gaussian kernel), is to remove high frequency components, and retain your lower frequency components. So in this case, what happens if we convolve the above image, with a gaussian (bilateral) filter that looks like this?


enter image description here


If we use this as our kernel, we will get the following result:



enter image description here


In other words, we have removed the high frequency components of the original image, but kept the low frequency components, since the variance of the gaussian kernel was chosen appropriately.


No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...