hs2361 / k-means-compressor

k means clustering based image compression algorithm project for OOPL
6 stars 8 forks source link

Added python implementation #14

Closed SamarthGarg09 closed 3 years ago

SamarthGarg09 commented 3 years ago

This is the python implementation of the project. Implementation of various image processing functionalities like Image compression, seam carving, conversion of image from RGB to grayscale and horizontal and vertical flipping of images are provided. Most of these functionalities are coded from scratch. It also consist of K-means compressor algorithm from scratch as well as using scikit-learn library. All the libraries required for the projects are mentioned in the req_lib.txt file.

Original Image

The Persistence of Memory By Salvador Dali

salvador_dali

Compressed Image

compressed_image

Horizontal as well as vertically seamed image

with horizontal and vertical scale ratio of 0.5 each

Horizontal_and_vertiaclly_seamed

vertical seamed image

with vertical scale ratio of 0.5

vertical_seam_carving

Horizontally seamed image

with horizontal scale ratio of 0.5

horizontal_seam_carving

Horizontally flipped image

horizontally_flipped

Vertically flipped Image

vertically_flipped

Grayscale Image

RGB_to_grayscale

DebadityaPal commented 3 years ago

Hi @SamarthGarg09 , it seems that you have deleted the c++ implementation, so if we merge this PR now, it'll delete the implementation from our repo as well. What I suggest is you create two folders, one called python and the other c++. Then store the respective files in the folders. That would ensure no deletion of files.