项目作者: grakshith

项目描述 :
K-Means clustering for Image Colour Quantization and Image Compression
高级语言: C++
项目地址: git://github.com/grakshith/Parallel-K-means.git
创建时间: 2017-09-27T12:43:06Z
项目社区:https://github.com/grakshith/Parallel-K-means

开源协议:

下载


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

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

To compile :

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

To run kmeans_serial.cpp :

  1. ./a.out test.jpg

Or just use serial.sh :p