Giter Site home page Giter Site logo

dejan2018 / image-compression-with-k-means-clustering Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wrinth/image-compression-with-k-means-clustering

0.0 1.0 0.0 393 KB

Implemented the K-means algorithm with Octave and Python for image compression.

Jupyter Notebook 80.72% MATLAB 19.28%

image-compression-with-k-means-clustering's Introduction

Image-Compression-with-K-Means-Clustering

Files included in this repository

  • MatLab-Octave/image_compression.m (Octave/MATLAB script for the Image Compression with K-means Klustering)
  • data/data.mat (Example Dataset for K-means)
  • data/bird small.png (Example Image)
  • MatLab-Octave/displayData.m (Displays 2D data stored in a matrix)
  • MatLab-Octave/drawLine.m (Draws a line over an exsiting figure)
  • MatLab-Octave/plotDataPoints.m (Initialization for K-means centroids)
  • MatLab-Octave/plotProgresskMeans.m (Plots each step of K-means as it proceeds)
  • MatLab-Octave/runkMeans.m (Runs the K-means algorithm)
  • MatLab-Octave/findClosestCentroids.m (Find closest centroids)
  • MatLab-Octave/computeCentroids.m (Compute centroid means)
  • MatLab-Octave/kMeansInitCentroids.m (Initialization for K-means centroids)

In this project, I implement the K-means algorithm and use it for image compression. I first started on an example 2D dataset (data.mat) to helped me gain an intuition of how the K-means algorithm works. After that, I used the K-means algorithm for image compression by reducing the number of colors that occur in an image to only those that are most common in that image.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.