Image Frequency Spectrum
A two-dimensional Fourier transform separates repeated structure by horizontal and vertical spatial frequency. Inspect where its peaks lie, read their approximate period in source-image pixels and compare center-line slices. This is a measurement of browser-decoded image patterns, not a verdict on visual quality.
Key features
- Analyze actual PNG, JPEG or still WebP pixels in the browser with a 128² or 256² sample grid.
- Choose encoded-sRGB luma or one RGB channel, a transparency background, mean removal and Hann or no window.
- View a centered logarithmic 2D FFT amplitude map and horizontal and vertical frequency slices.
- Read local peak vectors, approximate source-pixel periods, normal directions and relative amplitudes.
- Export the displayed spectrum PNG and a JSON report with measurements and settings.
- Load four generated PNG examples through the same image decoder as a selected file.
How to use
- Choose a local PNG, JPEG or still WebP, or load one of the generated stripe/flat examples.
- Select sample size, window, channel and transparency background; decide whether to remove the mean.
- Run the analysis and compare the 2D map, measured peaks and horizontal/vertical slices.
- Check the resampling and interpretation limits, then save the PNG or JSON report if needed.
Use cases
- Measure the repeat spacing of vertical bars in a print or test pattern.
- Compare horizontal and diagonal texture direction across examples.
- Inspect whether a flat region has a visible non-DC repeating pattern.
- Explore how a Hann window changes leakage near cropped pattern boundaries.
Frequently asked questions
What does a bright point in the map mean?
It shows strong amplitude at a pair of horizontal and vertical spatial frequencies. The map is shifted so zero frequency is at the center; opposite points represent the same real-image sinusoidal component. Brightness uses a logarithmic display scale.
How are period and direction calculated?
A peak at integer vector (kx, ky) spans approximately kx horizontal and ky vertical cycles across the whole source image. Its period is 1 / sqrt((kx/width)² + (ky/height)²) source pixels. Direction is the frequency-vector normal, clockwise from the image's horizontal axis; stripe lines run perpendicular to it.
Why can a peak or measured period be inaccurate?
The image is box-sampled to at most 256 × 256 before the transform. Detail finer than that grid can disappear or alias. Cropping, noise, nonperiodic edges, windowing, compression and multiple textures spread energy between bins. Peaks are local candidates, not a complete pattern diagnosis.
What do mean removal, DC and the Hann window do?
Mean removal subtracts the sampled channel's average before the transform, suppressing uniform brightness. DC is the zero-frequency amplitude after preprocessing. A Hann window tapers image edges to reduce leakage but widens peaks and changes amplitudes. Disable it to inspect exact integer-cycle synthetic examples.
What does the inverse reconstruction error check?
It is the root-mean-square numerical difference after transforming and inversely transforming the preprocessed sample grid. A small value checks arithmetic consistency. It does not measure photo quality, downsampling loss or restoration of the original file.
Are images uploaded or modified?
No image is sent to an analysis server. The original file is read only in page memory. The exported PNG is a new visualization and the JSON contains settings and numerical results, not source pixels or image metadata.
Privacy
Selected images and settings stay in this page's memory. Files are not uploaded to an analysis server or saved to browser storage. Downloads are made only on request; clearing or leaving the page releases temporary results.
Comments & questions