SkillAgentSearch skills...

Quantization

This code aim to reproduce an image quantization algorithm from an answer on CodeGolf in C++

Install / Use

/learn @bfraboni/Quantization
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Fast Gaussian quantization

Fast Gaussian blur + Image quantization = Fast Gaussian quantization.

This works followed closely the work I have done on image voronoization. The Codegolf thread that initiated the aforementioned project links another related Codegolf thread "Paint by Numbers", which I again wanted to try.

The answer provided by DavidC is a Mathematica code that perform a Gaussian blur step then an image quantization. Pretty simple and giving nice results ! I decided to port the exact same routine to C++, using my implementation of the fast Gaussian blur approximation by IvanK (see details here and my code here) and a classic K-Means pass for image quantization.

Here are the the results with various blur radiis (R) and number of colors after quantization (K):

|R\K|4|16|64|256| |:-:|:-:|:-:|:-:|:-:| |0||||| |1||||| |2||||| |4||||| |8||||| |16|||||

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated9mo ago
Forks1

Languages

C++

Security Score

62/100

Audited on Jun 21, 2025

No findings