Git Product home page Git Product logo

jpeg-compression-decompression's Introduction

Digital Image Processing

Semester Project

JPEG Compression and Decompression

๐Ÿ‘จ Participants:

Hammad Rashid 19L-1007 CS-6A

Salman Arshad 19L-2386 CS-6A

๐Ÿ”ง Language

Python

Libraries used:

import numpy as np
import cv2              # dct to cv2
import math             # math functions such as sin, cos, tan, abs
import heapq
import struct           # struct class to import the properties of struct
import tkinter as tk
from tkinter import filedialog, messagebox
from PIL import Image

Functions

def jpeg_compress(image, quality)
def jpeg_decompress(packed_bytes, quant_matrix)
def psnr(image1, image2)
def compression_image_handler()
def decompression_image_handler()
def psnr_image_handler()

Challenges

  1. The first challenge was to see how to read the image
  2. The second challenge was to select the appropriate method for compression. We chose Huffman Coding
  3. The third challenge was the psnr value
  4. The forth challenge was the decompression method. Although it was the reverse of compression, yet still it was a big challenge
  5. The fifth challenge included a way to show all the input on the gui

Solution

  1. For reading the file, we took help from Google and got to learn about OpenCV library
  2. We chose Huffman coding since it was easier to implement and we had done it previously
  3. psnr value was calculated using formulas

jpeg-compression-decompression's People

Contributors

hammadrashid1997 avatar

Watchers

 avatar

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.