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.