How ik4rd/svd works
Project type and purpose
• This is an open-source, CLI-based C utility (“svd”) that compresses images via truncated Singular Value Decomposition (SVD).
• It reads an input image (any format supported by ImageMagick), converts it to PGM/PPM, performs SVD per channel or grayscale, deflates the matrix, caches singular triplets, and writes out a compressed image.
File structure
• Top-level files: CMakeLists.txt (build), main.c (CLI entry), README.md, LICENSE.
• / & src/: mirror each other in modules:
• cache/ – cache I/O API (cache.h, cache.c)
• core/ – CLI parser (cli.h/c), processor orchestrator (processor.h/c), utilities (utils.h/c)
• image-processor/ – convert any image to PGM/PPM, image interface, PGM/PPM parsers
• linear-algebra/ – SVD algorithm (svd.h/c)
README for additional insights
• Describes math behind SVD, power iteration + deflation loop.
• Project layout details exactly how modules map to folders and responsibilities.