Skip to content

omgits0mar/ImageQuantization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Image Quantization and Segmentation

This repository contains implementations for the following image processing techniques:

  • Color quantization
  • Image segmentation
  • Image compression

Color Quantization

The idea of color quantization is to reduce the number of colors in a full resolution digital color image (24 bits per pixel) to a smaller set of representative colors called color palette. This project solves color quantization as a problem of clustering points in three-dimensional space, where the points represent colors found in the original image and the three axes represent the three color channels.

The implemented algorithm uses the Single-linkage clustering method (also called nearest neighbor method), where the distance between two clusters is the minimum distance between an observation in one cluster and an observation in the other cluster, which is defined as the Euclidean Distance. This is done by constructing a fully-connected undirected weighted graph and applying the minimum spanning tree greedy algorithm.

Image Segmentation

This project also includes an implementation of image segmentation using the K-means clustering algorithm.

Image Compression

The implemented image compression technique is based on the color quantization algorithm. The idea is to reduce the number of colors in the image, and then encode the image using a run-length encoding method.

Methodologies

  • Priority queue
  • Kruksal / Prim's algorithm for finding the minimum spanning tree
  • Single linkage clustering

Usage

To compress an image, run the program.cs script. Choose The image you need to compress and choose the 'K' number of clusters. You can enjoy the GUI while the code does his jobe to quantize and compress the size of your image.

Documentation

For more details on the explanation ide, implementation, results and running time, please see the [ImageQuantization doc](Image Quantization/Image Quantization.docx)

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages