Jobanpreet Singh Nagra

I am a Pre-Final UG pursuing Computer Science.

I'm passionate about astrophotography, image processing, computer vision and deploying practical ML solutions.

Email / GitHub / X / CV

profile photo

Image Compressor using K-Means Based Optimization

September 2025

The Image Compressor reduces image size through intelligent color-space quantization using K-Means clustering.
It is designed for performance, accuracy, and efficient memory usage on large-resolution images.

Core Technology: K-Means Clustering

The tool applies K-Means++ initialization to accelerate convergence by selecting statistically optimal cluster centers. This improves stability and reduces computational iterations.

Performance Optimization

It supports Elkan’s algorithm, which leverages triangle inequality bounds to prune unnecessary distance calculations.
This significantly enhances performance on datasets with millions of pixel vectors.

Resource and Accuracy Tuning

Users can adjust convergence tolerance to trade minimal perceptual quality for faster runtime.
This makes the tool adaptable for both high-speed batch compression and precision-focused image processing.


Design and source code from Jon Barron's website