The concept of frequency seperation

I've been trying to understand the concept of frequency seperation, and so far have been able to deduce very less of how the technique works.

This page, says that an image can be broken into low and high frequency sine waves!!! How is this possible? And how can we even visualize the sine waves in an image? What is the in depth mathematics of frequency seperation?

This is handled in university level mathematics. Basically it has been concluded that any signal can be split out to a infinite number of sine waves. This is called a Fourier series. Image 1: Successive amount of differently weighted sine waves summed becomes a better approximation of a square wave. A infinite of those needs to be taken to have a perfect square wave

If you want to understand why you, should watch: Time series superpowers: Intuitive understanding of the Fourier transform. Extending a n dimensional signal for Fourier is possible. Now this goes quite deep into signal processing theory quite quickly which is not well suited here.

You might understand this explanation better.

Basically a low pass filter passes all the low frequency wave information. While there are many low pass filters, you will probably know one by name: Its the Gaussian Blur.

Now the you can make a high pass filter by subtracting the low pass data from your original data, getting you a high pass filter. Since you just did:

Image - Lowpass = Hipass

from this follows (by adding Lowpass on both sides):

Image - Lowpass + Lowpass = Hipass + Lowpass

which is (due to Lowpasses canceling out):

Image = Hipass + Lowpass

Which is what they are claiming. This would work for any linear operator.

• you have mentioned that this is handled in university level mathematics, where does the math to this all begin from? Would it be possible for self study-ist to gain this amount of knowledge, if so, where do I start from? – bzal Mar 4 '17 at 13:58
• @bzal it starts with calculus and function analysis. Its possible to self study this. But its just a integral as explained in the video. You dont actually need to be able to derive the Fourier transform to use it though. Applications are understandable even without understanding how they are calculated. Just understand that this is one of those things that makes people drop out of STEM fields. – joojaa Mar 4 '17 at 14:59

Joojaa's answer explains this technically; I'll try and give you a more practical explanation.

Note, I don't actually do much (read; hardly ever) image manipulation so I'm no expert on the subject but I'll try and explain from my understanding.

how can we even visualize the sine waves in an image? What is the in depth mathematics of frequency seperation?

You don't need to think in terms of actual sine waves in an image; they're just used to conceptually represent "frequency", and you don't need to think in mathematical terms (you can, of course, but I don't think you'll benefit from it; the concept is actually pretty simple).

So what is it?

All you need to know is that you're working with spacial frequencies. So all we're talking about is space, or area; which is just an easy way of separating the different levels of detail. Larger detail = low frequency; Smaller details = high frequency.

You're separating fine detail (high frequency), which is good for working with skin textures and small imperfections, from larger areas (low frequency), which is good for working with color, tone, shadows and lights etc.

Conceptually, that's all there is too it.

This image from the article you linked does a pretty good job of visualising it: • do professionals know this mathematically? – bzal Mar 4 '17 at 14:02
• @bzal maybe, maybe not. As long as you know practically how to use it then it doesn't really matter – Cai Mar 4 '17 at 14:24

In math the rgb image is a mapping (=function) from 2 dimensional xy space to 3 dimensional rgb space. The mapped range is the pixel coordinate dimensions of your image and the destination range is the possible color rgb value combinations. To be more specific, both spaces are discrete and finite, only limited integer coordinate points are allowed.

An image as a mapping is most easily understood by thinking the image coordinates as complex numbers. The color values are most easily 3 different functions R, G and B that have complex variable.

This removes the need of 3 dimensional numbers altough they would be no problem in matrix algebra.

In math the spectral analysis of multidimensional mappings (=functions) has been well known at least 100 years.

The spectrum of an image consists the spectrums of R, G and B.

Each spectrum is the color function represented as a sum of complex sinusoidals that are exp(2pi (ax+by)j) where a and b are x and y directional frequencies . j is the imaginary unit. Only the amplitudes, phase angles and the needed frequency values are stored.

Who needs this for his living?

• A mathematician who developes theories or designs something to do for practical computer programmers.
• the computer programmer who tries to represent mathematician's work as runnable programs

A Photoshop user , like me, needs this only to look out smart and knowing. When trashing and mangling photos we think the spatial frequencies as how dense and deep changes there exists in the image. The denser and sharper details, the more high frequencies.

In Photoshop there are some filterings that can be interpreted as applying 2 dimensional frequency domain transfer functions:

• Gaussian blur - attenuates high frequencies, the higher freq, the more attenuation. It's a lowpass a filter without sharp frequency selection
• sharpening - High frequency boost
• low pass filter - as the name tells, very useful when one wants flatten high contrasts, but still wants to save the details. Equally useful when one wants to use blurring on some areas but here and there still wants to restore the details.

Here are some filtering examples as screenshots. At first the original (=a wild Rhododendron) The next is a lowpass filtered version. It's not blurred altough seems quite same. The high frequency loss has reduced the brightness very little. The removed high frequency content can be considered to be the output from a High Pass filter. It would be onscreen nearly black. To make it visually observable it's autocontrasted to full brightness range. Note, how all areas that were unsaharp in the original photo, are nearly vanished due their low high frequency content Filterings are made in Photoshop. It's highpass filter is used. Note: Photoshop's high pass filter add 128 to all RGB values, because negative values can't be handled in Photoshop.