Skip to content

This is the Implementation for the Vector Quantization Algorithm using java.

Notifications You must be signed in to change notification settings

moheladwy/VectorQuantization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vector Quantization Image Compression

Overview

This project implements a Vector Quantization Image Compression Algorithm with a Java Swing GUI. The algorithm aims to compress images using vector quantization, and the graphical user interface provides a convenient way to interact with the compression and decompression processes.

Project Structure

Models Package

The Models package contains the models of the Vector Quantization algorithm.

Logic Package

The Logic package contains the core implementation of the Vector Quantization algorithm.

GUI Package

The GUI package contains the graphical user interface components.

How to Use

  1. Run the program using the following command in the CLI, and a GUI window will appear:
      git clone https://github.com/moheladwy/VectorQuantization.git VectorQuantization
      cd VectorQuantization
      javac Program.java 
      java Program.class
  2. Click the "Browse" button to choose an image for compression.
  3. Press the "Compress" button to initiate the compression process.
  4. The compressed image will be displayed along with relevant information.
  5. Click the "Clear Image" button to reset and choose a new image.

Dependencies

  • Java Swing
  • BufferedImage
  • File I/O
  • Java Collections Framework

Note

  • Ensure that the chosen image has one of the following extensions: jpg, jpeg, png, bmp, gif.
  • The compressed image will be saved in the same directory as the original with the filename appended "_compressed".

Examples

First Example:

Original Image Compressed Image

Second Example:

Original Image Compressed Image

Third Example:

Original Image Compressed Image

Contributors

Feel free to explore and modify the code to suit your needs. If you have any questions or suggestions, please contact me on my email: mohamed.h.eladwy@gmail.com