Spatial frequency (SF)

Version 1.0.0 (1.53 KB) by dralp
Spatial Frequency (SF) is an image quality metric that measures the overall activity level in an image.
403 Downloads
Updated 8 Sep 2018

View License

Spatial frequency (SF) is an image quality metric that measures the overall activity level in an image [1]. The spatial frequency is defined as

SF= sqrt (RF^2 + CF^2)

where RF is the row frequency and CF is the column frequency. Formulas for CF, RF and SF can be found here [1,2].

Li et al. present values for SF, which are between 5 and 30. Spatial frequency function given here generates values between 0 and 1. This is presumably due to the greyscaling. Li et al. do not present the method of their greyscaling.

Here, Matlab function rgb2gray [3] is used to convert RGB values to grayscale values by forming a weighted sum of the R, G, and B components:
0.2989 * R + 0.5870 * G + 0.1140 * B
These are the same weights used by the rgb2ntsc function to compute the Y component.
The coefficients used to calculate grayscale values in rgb2gray are identical to those used to calculate luminance (E'y) in Rec.ITU-R BT.601-7 after rounding to 3 decimal places.
Rec.ITU-R BT.601-7 calculates E'y using the following formula:
0.299 * R + 0.587 * G + 0.114 * B

The SF should not be mixed with the spatial frequency of the visual system. Spatial frequency (in the context of the visual system) refers to the level of detail present in a stimulus per degree of visual angle [4].

References
[1] Eskicioglu, A. M., & Fisher, P. S. (1995). Image quality measures and their performance. IEEE Transactions on communications, 43(12), 2959-2965.
[2] Li, S., Kwok, J. T., & Wang, Y. (2001). Combination of images with diverse focuses using the spatial frequency. Information fusion, 2(3), 169-176.
[3] https://au.mathworks.com/help/matlab/ref/rgb2gray.html
[4] https://www.ucalgary.ca/pip369/mod4/spatial/frequency1

Cite As

dralp (2024). Spatial frequency (SF) (https://www.mathworks.com/matlabcentral/fileexchange/68753-spatial-frequency-sf), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0