28

Image Compressor 🏙️

An image compression project using Haskell, implemented during my third year at Epitech.

🎯 Mission

Image Compressor was a school project undertaken during my third year at Epitech 🎓. The main objective was to develop an image compression program using the Haskell programming language 🧬.

🔧 Implementation

A rudimentary way to compress an image 🏙️ entails limiting the number of colors it possesses. This process can be broken down into three steps:

  1. Scan the image 🏙️ and retrieve the colors from each pixel 🔍.
  2. Group these colors into clusters and supplant every color in a particular cluster with the average color of that cluster 🌈.
  3. Index the cluster averages and fashion the compressed image 💾.

K-means Algorithm 🧮

In this endeavor, the K-means algorithm was required to be implemented.

Advantages ✅:

  • Easy to understand and intuitive 🧠.
  • Efficient for medium-sized datasets 📊.

Drawbacks ❌:

  • Might converge to local optima 😅.
  • Can be influenced by the initial values of clusters 🌀.
  • Doesn't perform well with non-linear cluster shapes 📐.

🎨 Compression Illustration

Image Compressor Snapshot

For a more in-depth overview, you can visit the project's GitHub repository: Image Compressor GitHub Repository 🔗.

🛠️ Technologies Deployed

  • Haskell