Giter Club home page Giter Club logo

image-vectorquantizer's Introduction

Image Vectorquantizer

designed for Proseminar Datenkompression SS20 at RWTH Aachen University

General info

IQCv2 takes a .jpg image and treats the individual RGB values of each Pixel in the image as a threedimensional vector. During encoding, a variation of the Linde-Buzo-Gray Algorithm is used to produce a codebook of a size that can be specified by the user. Supposing a naive image format, that stores each pixel color as three individual values between 0 and 256 (this would result in a codebook with 16.777.216 vectors and 24 bit for each pixel, if each value was stored in binary), this method of compression is capable of a significant saving of storage data. Actually, depending on the specific image, using the Linde-Buzo-Gray (LBG) Algorithm, as little as 128 codevectors can be enough to reconstruct an image that is basically indifferentiable to a human observer, as you can see below.

Original image 8 codevectors 64 codevectors 512 codevectors

The top left picture is the original one and the following are reconstructions from codebooks with 8, 64 and 512 codevectors. The encoding process will result in the files codebook.txt, where the binary values of the algorithmically determined codevectors are stored, and the file transmission.txt, where the binary index of the codevector that corresponds with each pixel is stored. During decoding, first the codebook is read, and then each value from the transmission.txt file is matched up with their respective index from the codebook, which is then used to reconstruct the image.

Complexity

Space Complexity File
equation for codebook.txt
equation for transmission.txt

where equation is the number of codevectors.

Runtime Complexity
equation for Encoding
equation for Decoding

Sources

The picture examples from this readme.md are outputs of this project for pictures licensed under Creative Commons (https://search.creativecommons.org/photos/9e65a3ae-8ea0-4637-8cb4-6d996624f96f)

image-vectorquantizer's People

Contributors

simonmichau avatar

Watchers

 avatar

image-vectorquantizer's Issues

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.