In this project, we have compared two algorithms: K-Means Clustering & Singular value Decomposition for image compression. K-Means algorithm is a centroid based clustering technique which clusters the dataset into k different clusters, each cluster represented by its centroid point. The pixels of the data points are replaced by the pixels of their respective centroid points, thus giving us the compressed image. Singular value decomposition algorithm is a matrix factorization technique which finds the best approximation of original pixel data points that are of huge dimensions, with fewer dimensions. It removes redundant data by performing low rank approximation. The most crucial data are stored in certain singular values. So, we can eliminate some of the singular values for bringing about better compression.
psycoms / image-compression---kmeans-vs-svd Goto Github PK
View Code? Open in Web Editor NEWIn this project, we have compared two algorithms: K-Means Clustering & Singular value Decomposition for image compression. K-Means algorithm is a centroid based clustering technique which clusters the dataset into k different clusters, each cluster represented by its centroid point. The pixels of the data points are replaced by the pixels of their respective centroid points, thus giving us the compressed image. Singular value decomposition algorithm is a matrix factorization technique which finds the best approximation of original pixel data points that are of huge dimensions, with fewer dimensions. It removes redundant data by performing low rank approximation. The most crucial data are stored in certain singular values. So, we can eliminate some of the singular values for bringing about better compression.