Skip to content

K-Means clustering for Image Colour Quantization and Image Compression

Notifications You must be signed in to change notification settings

grakshith/Parallel-K-means

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallel-K-means

Repository contains code for k-means clustering used for Image Colour Quantization and Image Compression.

Overview

Image colour quantization is an important problem in Computer Graphics and Image Processing. This reduces the number of colours in the image and facilitates the display, storage, and transmission of images. This is a necessary prepossessing to make images compatible for low-end hardware device which can display a limited number of colours. This work shows how this quantization can be achieved using of k-means clustering. The algorithm is implemented in parallel in various platforms such as OpenMP, CUDA, and MPI. We find that CUDA outperforms other platforms by a large margin due to fine-grained parallelism and higher degree of concurrency.

OpenCV Installation link can be found here

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

To compile :

g++ a.cpp `pkg-config --cflags --libs opencv`

To run kmeans_serial.cpp :

./a.out test.jpg

Or just use serial.sh :p

About

K-Means clustering for Image Colour Quantization and Image Compression

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •