
Final project for Scientific Computing and Data Analysis (UFRJ, 2026.1). The goal was to make the theorems visible: why truncating the SVD at the k largest singular values gives the best possible approximation of the image.
Interface, API, numerical implementation and the theory page with the formulas.
Backend processing
NumPy and SciPy (truncated SVD via ARPACK) decompose each RGB channel and return the reconstructed image for each k.
Region-based compression
The user selects an area with the mouse and chooses between a global SVD with a mask or per-tile SVD on 128×128 blocks.
Theory × measurement
The analysis screen compares the error predicted by the Frobenius norm with the pixel-by-pixel measurement, and shows the instability of computing σ via √λ(AᵀA).
Three screens (Compressor, Analysis and Theory) and seven endpoints. In the charts, SVD always sits below the alternatives, confirming the theorem's optimality.