MakarovSuites
English
EnglishDeutschРусскийУкраїнськаFrançaisEspañolItalianoPolski
Contact & licences

Math

Fourier in two dimensions: inside JPEG

Decompose images into orthonormal 8×8 cosine blocks, remove or quantize coefficients and measure reconstruction error.

Fourier in two dimensions: inside JPEG — Actual application image
Actual application image

Try this

A grayscale image is split into 8×8 cosine blocks. Keep low-frequency zigzag coefficients and optionally quantize them with a JPEG-style luminance table. Click a source block to inspect its coefficients. This demonstrates the transform stage, not file encoding.

Equations used in the module
Equations
Cuv = ¼ αuαv ΣxΣy (Ixy−128) cos((2x+1)uπ/16) cos((2y+1)vπ/16)
α0=1/√2; αk=1 otherwise
Quantized coefficient = Q · round(C/Q)
PSNR = 10 log₁₀(255²/MSE)

Related experiments

Back to catalogue
Least squares and overfitting — Actual application image

Math

Least squares and overfitting

Fit noisy data with polynomials, move an outlier, compare training and reference errors and control overfitting with ridge regularization.

k-means clustering — Actual application image

Math

k-means clustering

Step through k-means assignments and centroid updates, move centres manually and compare cluster counts on an elbow curve.