SlideShare a Scribd company logo
Image Compression
using K-Means
Clustering Method
In Supervision of:
Prof. Amit Mitra
Submitted By:
Gyanendra Awasthi(201315)
Pankaj Kumar(170455)
Contents
Clustering
K-means Clustering
Cost Function
Display on actual Dataset
Code Snippets
Examples of some original and compressed images
Uses of image compression
Results
Drawbacks of K-means
References
Clustering
•Group of collection of points into clusters
• Patterns are extracted from variables without
analysing any variable – unsupervised learning
•The points in each cluster are closer to one
another and far from points in other clusters
K-Means Clustering
• Unsupervised learning algorithm.
• Grouping of different data points which are like each other.
• Forming dissimilar groups and each group containing similar data points
• To partition data into distinct K clusters. K is defined by user.
•Works on predefined distinct K clusters in which each data point belongs to a
particular cluster.
Cost Function
•The goal is to minimize within-cluster dissimilarity.
•The Cost function(J) is:
J= 𝑖=1
𝑁
𝑘=1
𝐾
𝑟𝑖𝑘 𝑥(𝑖)
− 𝜇𝑘
2
Where= 𝑥(𝑖)
are data points
𝜇𝑘 is center of cluster k.
𝑟𝑖𝑘 = 1 if 𝑥(𝑖)
belongs to cluster k and 0 if it doesn’t belong to cluster k.
k = 1,.,…,K where K is the number of clusters provided
N is the number of total data points
•J represents sum of distances between each data 𝑥(𝑖)
and cluster center 𝜇𝑘.
• Cost function J is minimized for optimal clustering.
•After each iteration 𝜇𝑘 is obtained by the formula
𝜇𝑘 =
𝑖=1
𝑁
𝑟𝑖𝑘𝑥𝑖
𝑖=1
𝑁
𝑟𝑖𝑘
K- Means Algorithm
Step1- Randomly initialize the K data points as initial centroids for K clusters
Step2- Until the cluster centers are changed or for max iteration
◦ Allocate each data point to centroid whose data point is nearest
◦ Replace the cluster centres with the mean of the element in their
clusters
end
Display on actual dataset
Code- Snippets
To compute the nearest centroids for data points.
Image Compression
•An image is made up of small intensity dots called pixels.
•Each pixel contains three values which are the values of intensities of Red, Blue, Green colors
respectively for that pixel
•Reducing the size that an image takes while storing and transmitting
• Reducing the number of colors occurred in image to the most frequent colors appearing in it
• Essentially forming the different clusters of frequent occurring colors present in the image by
using pixel values
Original and Compressed Image-Parrot
𝑡𝑛= time taken for K- means algorithm to run for n iterations
Fig1b. 𝑡10= 1min 42sec
Fig1a. Original Image
Original and Compressed Image-Parrot
Fig1c. 𝑡10= 6min 32sec Fig1d. 𝑡10= 12min 42sec Fig.1e 𝑡10= 50min 40sec
Original and Compressed Image-Scenery
Fig2b. 𝑡10= 2 min 10sec
Fig2a. Original Image
Original and Compressed Image-Scenery
Fig2e. 𝑡10= 63 min 30sec
Fig2d. 𝑡10= 15 min 30sec
Fig2c. 𝑡10= 8 min 15sec
Uses of Image Compression
•Lesser data for storing the compressed image compared to original image,
reducing the cost of storage and transmission
• K-Means is utilized to compress visual contents in vast nexus of social
messaging app for its faster transmission and less storage utilization
•Used for archival purpose and for medical imaging, technical drawings
•Widely used in remote sensing via satellite, television broadcasting, for
capturing and transmitting satellite images
Results
Actual Size of Image of
Parrot
Number of clusters(K)
Specified while
Compressing the image
Reduced Size of the
Image of Parrot
1,87,236 bytes
100 52,032 bytes
20 54,888 bytes
15 54,888 bytes
12 54,351 bytes
2 43,616 bytes
Table1. Results of K-means clustering applied on parrot.jpg
Results
Actual Size of Image of
Scenery
Number of clusters(K)
Specified while
Compressing the image
Reduced Size of the
Image of Scenery
5,50,287 bytes
50 1,01,404 bytes
10 1,01,813 bytes
5 95,616 bytes
2 83,729 bytes
Table2. Results of K-means clustering applied on scenery.jpg
Drawbacks of K-means
• Gets sluggish as the size of data(image) increases.
• Time taken by algorithm increases as the number of cluster (K) increases.
• Results may represent a suboptimal local minimum.
• Works only for linear or almost linear boundaries
References
•Xing Wan (2019), “Application of K-means Algorithm in Image Compression”, IOP Conference
Series: Materials Science and Engineering, 563 052042,
•B. Reddaiah “A Study on Image Compression and its Applications”, International Journal of
Computer Applications, Volume 177 – No. 38, February 2020
•Hartigan, J. A., Wong, M. A. (1979). Algorithm as 136: a k-means clustering algorithm. Journal of
the Royal Statistical Society, 28(1), 100-10
•https://www.simplilearn.com/tutorials/machine-learning-tutorial/k-means-clustering-algorithm
•Van der Geer, J., Hanraads, J.A.J., Lupton, R.A. (2010) The art of writing a scientific article. J. Sci.
Commun., 163: 51–59.
Image Compression using K-Means Clustering Method

More Related Content

What's hot

Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
lavanya marichamy
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
Hossain Md Shakhawat
 
Chapter 8 image compression
Chapter 8 image compressionChapter 8 image compression
Chapter 8 image compression
asodariyabhavesh
 
Line Detection using Hough transform .pptx
Line Detection using Hough transform .pptxLine Detection using Hough transform .pptx
Line Detection using Hough transform .pptx
shubham loni
 
Image Based Steganpgraphy
Image Based SteganpgraphyImage Based Steganpgraphy
Image Based Steganpgraphy
Omkar Rane
 
MPEG Compression Standards
MPEG Compression StandardsMPEG Compression Standards
MPEG Compression Standards
Ajay
 
Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
Hemantha Kulathilake
 
image compression using matlab project report
image compression  using matlab project reportimage compression  using matlab project report
image compression using matlab project report
kgaurav113
 
Content based image retrieval
Content based image retrievalContent based image retrieval
Content based image retrieval
rubaiyat11
 
Image compression standards
Image compression standardsImage compression standards
Image compression standards
kirupasuchi1996
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operations
mukesh bhardwaj
 
A proposed accelerated image copy-move forgery detection-vcip2014
A proposed accelerated image copy-move forgery detection-vcip2014A proposed accelerated image copy-move forgery detection-vcip2014
A proposed accelerated image copy-move forgery detection-vcip2014
SondosFadl
 
Thesis on Image compression by Manish Myst
Thesis on Image compression by Manish MystThesis on Image compression by Manish Myst
Thesis on Image compression by Manish Myst
Manish Myst
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
DEEPASHRI HK
 
Image segmentation
Image segmentationImage segmentation
Image compression
Image compressionImage compression
Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
M.k. Praveen
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIP
babak danyal
 
Introduction to Image Compression
Introduction to Image CompressionIntroduction to Image Compression
Introduction to Image Compression
Kalyan Acharjya
 
Super resolution
Super resolutionSuper resolution
Super resolution
Federico D'Amato
 

What's hot (20)

Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
Chapter 8 image compression
Chapter 8 image compressionChapter 8 image compression
Chapter 8 image compression
 
Line Detection using Hough transform .pptx
Line Detection using Hough transform .pptxLine Detection using Hough transform .pptx
Line Detection using Hough transform .pptx
 
Image Based Steganpgraphy
Image Based SteganpgraphyImage Based Steganpgraphy
Image Based Steganpgraphy
 
MPEG Compression Standards
MPEG Compression StandardsMPEG Compression Standards
MPEG Compression Standards
 
Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
 
image compression using matlab project report
image compression  using matlab project reportimage compression  using matlab project report
image compression using matlab project report
 
Content based image retrieval
Content based image retrievalContent based image retrieval
Content based image retrieval
 
Image compression standards
Image compression standardsImage compression standards
Image compression standards
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operations
 
A proposed accelerated image copy-move forgery detection-vcip2014
A proposed accelerated image copy-move forgery detection-vcip2014A proposed accelerated image copy-move forgery detection-vcip2014
A proposed accelerated image copy-move forgery detection-vcip2014
 
Thesis on Image compression by Manish Myst
Thesis on Image compression by Manish MystThesis on Image compression by Manish Myst
Thesis on Image compression by Manish Myst
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image compression
Image compressionImage compression
Image compression
 
Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIP
 
Introduction to Image Compression
Introduction to Image CompressionIntroduction to Image Compression
Introduction to Image Compression
 
Super resolution
Super resolutionSuper resolution
Super resolution
 

Similar to Image Compression using K-Means Clustering Method

Pillar k means
Pillar k meansPillar k means
Pillar k means
swathi b
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
IRJET Journal
 
Deep Local Parametric Filters for Image Enhancement
Deep Local Parametric Filters for Image EnhancementDeep Local Parametric Filters for Image Enhancement
Deep Local Parametric Filters for Image Enhancement
Sean Moran
 
Master defense presentation 2019 04_18_rev2
Master defense presentation 2019 04_18_rev2Master defense presentation 2019 04_18_rev2
Master defense presentation 2019 04_18_rev2
Hyun Wong Choi
 
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
IRJET Journal
 
IRJET- Finding Dominant Color in the Artistic Painting using Data Mining ...
IRJET-  	  Finding Dominant Color in the Artistic Painting using Data Mining ...IRJET-  	  Finding Dominant Color in the Artistic Painting using Data Mining ...
IRJET- Finding Dominant Color in the Artistic Painting using Data Mining ...
IRJET Journal
 
WEB IMAGE RETRIEVAL USING CLUSTERING APPROACHES
WEB IMAGE RETRIEVAL USING CLUSTERING APPROACHESWEB IMAGE RETRIEVAL USING CLUSTERING APPROACHES
WEB IMAGE RETRIEVAL USING CLUSTERING APPROACHES
cscpconf
 
Report
ReportReport
Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...
Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...
Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...
Gurbinder Gill
 
Unsupervised Learning Clustering KMean and Hirarchical.pptx
Unsupervised Learning Clustering KMean and Hirarchical.pptxUnsupervised Learning Clustering KMean and Hirarchical.pptx
Unsupervised Learning Clustering KMean and Hirarchical.pptx
FaridAliMousa1
 
Object Shape Representation by Kernel Density Feature Points Estimator
Object Shape Representation by Kernel Density Feature Points Estimator Object Shape Representation by Kernel Density Feature Points Estimator
Object Shape Representation by Kernel Density Feature Points Estimator
cscpconf
 
Kyle DiGirolamo octave project summary
Kyle DiGirolamo octave project summaryKyle DiGirolamo octave project summary
Kyle DiGirolamo octave project summary
Kyle DiGirolamo
 
Quality and size assessment of quantized images using K-Means++ clustering
Quality and size assessment of quantized images using K-Means++ clusteringQuality and size assessment of quantized images using K-Means++ clustering
Quality and size assessment of quantized images using K-Means++ clustering
journalBEEI
 
presentation 2019 04_09_rev1
presentation 2019 04_09_rev1presentation 2019 04_09_rev1
presentation 2019 04_09_rev1
Hyun Wong Choi
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
Akbarali206563
 
Final edited master defense-hyun_wong choi_2019_05_23_rev21
Final edited master defense-hyun_wong choi_2019_05_23_rev21Final edited master defense-hyun_wong choi_2019_05_23_rev21
Final edited master defense-hyun_wong choi_2019_05_23_rev21
Hyun Wong Choi
 
master defense hyun-wong choi_2019_05_14_rev19
master defense hyun-wong choi_2019_05_14_rev19master defense hyun-wong choi_2019_05_14_rev19
master defense hyun-wong choi_2019_05_14_rev19
Hyun Wong Choi
 
master defense hyun-wong choi_2019_05_14_rev19
master defense hyun-wong choi_2019_05_14_rev19master defense hyun-wong choi_2019_05_14_rev19
master defense hyun-wong choi_2019_05_14_rev19
Hyun Wong Choi
 
defense hyun-wong choi_2019_05_14_rev18
defense hyun-wong choi_2019_05_14_rev18defense hyun-wong choi_2019_05_14_rev18
defense hyun-wong choi_2019_05_14_rev18
Hyun Wong Choi
 

Similar to Image Compression using K-Means Clustering Method (20)

Pillar k means
Pillar k meansPillar k means
Pillar k means
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
 
Deep Local Parametric Filters for Image Enhancement
Deep Local Parametric Filters for Image EnhancementDeep Local Parametric Filters for Image Enhancement
Deep Local Parametric Filters for Image Enhancement
 
Master defense presentation 2019 04_18_rev2
Master defense presentation 2019 04_18_rev2Master defense presentation 2019 04_18_rev2
Master defense presentation 2019 04_18_rev2
 
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
 
IRJET- Finding Dominant Color in the Artistic Painting using Data Mining ...
IRJET-  	  Finding Dominant Color in the Artistic Painting using Data Mining ...IRJET-  	  Finding Dominant Color in the Artistic Painting using Data Mining ...
IRJET- Finding Dominant Color in the Artistic Painting using Data Mining ...
 
WEB IMAGE RETRIEVAL USING CLUSTERING APPROACHES
WEB IMAGE RETRIEVAL USING CLUSTERING APPROACHESWEB IMAGE RETRIEVAL USING CLUSTERING APPROACHES
WEB IMAGE RETRIEVAL USING CLUSTERING APPROACHES
 
Report
ReportReport
Report
 
Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...
Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...
Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...
 
Unsupervised Learning Clustering KMean and Hirarchical.pptx
Unsupervised Learning Clustering KMean and Hirarchical.pptxUnsupervised Learning Clustering KMean and Hirarchical.pptx
Unsupervised Learning Clustering KMean and Hirarchical.pptx
 
Object Shape Representation by Kernel Density Feature Points Estimator
Object Shape Representation by Kernel Density Feature Points Estimator Object Shape Representation by Kernel Density Feature Points Estimator
Object Shape Representation by Kernel Density Feature Points Estimator
 
Kyle DiGirolamo octave project summary
Kyle DiGirolamo octave project summaryKyle DiGirolamo octave project summary
Kyle DiGirolamo octave project summary
 
Quality and size assessment of quantized images using K-Means++ clustering
Quality and size assessment of quantized images using K-Means++ clusteringQuality and size assessment of quantized images using K-Means++ clustering
Quality and size assessment of quantized images using K-Means++ clustering
 
presentation 2019 04_09_rev1
presentation 2019 04_09_rev1presentation 2019 04_09_rev1
presentation 2019 04_09_rev1
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Final edited master defense-hyun_wong choi_2019_05_23_rev21
Final edited master defense-hyun_wong choi_2019_05_23_rev21Final edited master defense-hyun_wong choi_2019_05_23_rev21
Final edited master defense-hyun_wong choi_2019_05_23_rev21
 
master defense hyun-wong choi_2019_05_14_rev19
master defense hyun-wong choi_2019_05_14_rev19master defense hyun-wong choi_2019_05_14_rev19
master defense hyun-wong choi_2019_05_14_rev19
 
master defense hyun-wong choi_2019_05_14_rev19
master defense hyun-wong choi_2019_05_14_rev19master defense hyun-wong choi_2019_05_14_rev19
master defense hyun-wong choi_2019_05_14_rev19
 
defense hyun-wong choi_2019_05_14_rev18
defense hyun-wong choi_2019_05_14_rev18defense hyun-wong choi_2019_05_14_rev18
defense hyun-wong choi_2019_05_14_rev18
 

More from Gyanendra Awasthi

Gradient Based Learning Applied to Document Recognition
Gradient Based Learning Applied to Document RecognitionGradient Based Learning Applied to Document Recognition
Gradient Based Learning Applied to Document Recognition
Gyanendra Awasthi
 
Modelling Frontier Mortality using Bayesian Generalised Additive Models
Modelling Frontier Mortality using Bayesian Generalised Additive ModelsModelling Frontier Mortality using Bayesian Generalised Additive Models
Modelling Frontier Mortality using Bayesian Generalised Additive Models
Gyanendra Awasthi
 
Hyperloop- A 21st century transportation revolution
Hyperloop- A 21st century transportation revolutionHyperloop- A 21st century transportation revolution
Hyperloop- A 21st century transportation revolution
Gyanendra Awasthi
 
Study and performance analysis of combustion chamber using
Study and performance analysis of combustion chamber usingStudy and performance analysis of combustion chamber using
Study and performance analysis of combustion chamber using
Gyanendra Awasthi
 
Study and performance analysis of combustion chamber using ANSYS
Study and performance analysis of combustion chamber using ANSYSStudy and performance analysis of combustion chamber using ANSYS
Study and performance analysis of combustion chamber using ANSYS
Gyanendra Awasthi
 
Manufacturing of Stuffing box
Manufacturing of Stuffing boxManufacturing of Stuffing box
Manufacturing of Stuffing box
Gyanendra Awasthi
 
Microstructure and chemical compositions of ferritic stainless steel
Microstructure and chemical compositions of ferritic stainless steelMicrostructure and chemical compositions of ferritic stainless steel
Microstructure and chemical compositions of ferritic stainless steel
Gyanendra Awasthi
 
Hyperloop- A 21st century transportation revolution
Hyperloop- A 21st century transportation revolutionHyperloop- A 21st century transportation revolution
Hyperloop- A 21st century transportation revolution
Gyanendra Awasthi
 

More from Gyanendra Awasthi (8)

Gradient Based Learning Applied to Document Recognition
Gradient Based Learning Applied to Document RecognitionGradient Based Learning Applied to Document Recognition
Gradient Based Learning Applied to Document Recognition
 
Modelling Frontier Mortality using Bayesian Generalised Additive Models
Modelling Frontier Mortality using Bayesian Generalised Additive ModelsModelling Frontier Mortality using Bayesian Generalised Additive Models
Modelling Frontier Mortality using Bayesian Generalised Additive Models
 
Hyperloop- A 21st century transportation revolution
Hyperloop- A 21st century transportation revolutionHyperloop- A 21st century transportation revolution
Hyperloop- A 21st century transportation revolution
 
Study and performance analysis of combustion chamber using
Study and performance analysis of combustion chamber usingStudy and performance analysis of combustion chamber using
Study and performance analysis of combustion chamber using
 
Study and performance analysis of combustion chamber using ANSYS
Study and performance analysis of combustion chamber using ANSYSStudy and performance analysis of combustion chamber using ANSYS
Study and performance analysis of combustion chamber using ANSYS
 
Manufacturing of Stuffing box
Manufacturing of Stuffing boxManufacturing of Stuffing box
Manufacturing of Stuffing box
 
Microstructure and chemical compositions of ferritic stainless steel
Microstructure and chemical compositions of ferritic stainless steelMicrostructure and chemical compositions of ferritic stainless steel
Microstructure and chemical compositions of ferritic stainless steel
 
Hyperloop- A 21st century transportation revolution
Hyperloop- A 21st century transportation revolutionHyperloop- A 21st century transportation revolution
Hyperloop- A 21st century transportation revolution
 

Recently uploaded

UofT毕业证如何办理
UofT毕业证如何办理UofT毕业证如何办理
UofT毕业证如何办理
exukyp
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
Timothy Spann
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
bopyb
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
v7oacc3l
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
nuttdpt
 
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
bmucuha
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Kiwi Creative
 
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens""Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
sameer shah
 
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCAModule 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
yuvarajkumar334
 
Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
Márton Kodok
 
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Kaxil Naik
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
jitskeb
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
nyfuhyz
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
Timothy Spann
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
ihavuls
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
Lars Albertsson
 

Recently uploaded (20)

UofT毕业证如何办理
UofT毕业证如何办理UofT毕业证如何办理
UofT毕业证如何办理
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
 
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
 
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens""Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
 
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCAModule 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
 
Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
 
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
 

Image Compression using K-Means Clustering Method

  • 1. Image Compression using K-Means Clustering Method In Supervision of: Prof. Amit Mitra Submitted By: Gyanendra Awasthi(201315) Pankaj Kumar(170455)
  • 2. Contents Clustering K-means Clustering Cost Function Display on actual Dataset Code Snippets Examples of some original and compressed images Uses of image compression Results Drawbacks of K-means References
  • 3. Clustering •Group of collection of points into clusters • Patterns are extracted from variables without analysing any variable – unsupervised learning •The points in each cluster are closer to one another and far from points in other clusters
  • 4. K-Means Clustering • Unsupervised learning algorithm. • Grouping of different data points which are like each other. • Forming dissimilar groups and each group containing similar data points • To partition data into distinct K clusters. K is defined by user. •Works on predefined distinct K clusters in which each data point belongs to a particular cluster.
  • 5. Cost Function •The goal is to minimize within-cluster dissimilarity. •The Cost function(J) is: J= 𝑖=1 𝑁 𝑘=1 𝐾 𝑟𝑖𝑘 𝑥(𝑖) − 𝜇𝑘 2 Where= 𝑥(𝑖) are data points 𝜇𝑘 is center of cluster k. 𝑟𝑖𝑘 = 1 if 𝑥(𝑖) belongs to cluster k and 0 if it doesn’t belong to cluster k. k = 1,.,…,K where K is the number of clusters provided N is the number of total data points •J represents sum of distances between each data 𝑥(𝑖) and cluster center 𝜇𝑘. • Cost function J is minimized for optimal clustering. •After each iteration 𝜇𝑘 is obtained by the formula 𝜇𝑘 = 𝑖=1 𝑁 𝑟𝑖𝑘𝑥𝑖 𝑖=1 𝑁 𝑟𝑖𝑘
  • 6. K- Means Algorithm Step1- Randomly initialize the K data points as initial centroids for K clusters Step2- Until the cluster centers are changed or for max iteration ◦ Allocate each data point to centroid whose data point is nearest ◦ Replace the cluster centres with the mean of the element in their clusters end
  • 8. Code- Snippets To compute the nearest centroids for data points.
  • 9. Image Compression •An image is made up of small intensity dots called pixels. •Each pixel contains three values which are the values of intensities of Red, Blue, Green colors respectively for that pixel •Reducing the size that an image takes while storing and transmitting • Reducing the number of colors occurred in image to the most frequent colors appearing in it • Essentially forming the different clusters of frequent occurring colors present in the image by using pixel values
  • 10. Original and Compressed Image-Parrot 𝑡𝑛= time taken for K- means algorithm to run for n iterations Fig1b. 𝑡10= 1min 42sec Fig1a. Original Image
  • 11. Original and Compressed Image-Parrot Fig1c. 𝑡10= 6min 32sec Fig1d. 𝑡10= 12min 42sec Fig.1e 𝑡10= 50min 40sec
  • 12. Original and Compressed Image-Scenery Fig2b. 𝑡10= 2 min 10sec Fig2a. Original Image
  • 13. Original and Compressed Image-Scenery Fig2e. 𝑡10= 63 min 30sec Fig2d. 𝑡10= 15 min 30sec Fig2c. 𝑡10= 8 min 15sec
  • 14. Uses of Image Compression •Lesser data for storing the compressed image compared to original image, reducing the cost of storage and transmission • K-Means is utilized to compress visual contents in vast nexus of social messaging app for its faster transmission and less storage utilization •Used for archival purpose and for medical imaging, technical drawings •Widely used in remote sensing via satellite, television broadcasting, for capturing and transmitting satellite images
  • 15. Results Actual Size of Image of Parrot Number of clusters(K) Specified while Compressing the image Reduced Size of the Image of Parrot 1,87,236 bytes 100 52,032 bytes 20 54,888 bytes 15 54,888 bytes 12 54,351 bytes 2 43,616 bytes Table1. Results of K-means clustering applied on parrot.jpg
  • 16. Results Actual Size of Image of Scenery Number of clusters(K) Specified while Compressing the image Reduced Size of the Image of Scenery 5,50,287 bytes 50 1,01,404 bytes 10 1,01,813 bytes 5 95,616 bytes 2 83,729 bytes Table2. Results of K-means clustering applied on scenery.jpg
  • 17. Drawbacks of K-means • Gets sluggish as the size of data(image) increases. • Time taken by algorithm increases as the number of cluster (K) increases. • Results may represent a suboptimal local minimum. • Works only for linear or almost linear boundaries
  • 18. References •Xing Wan (2019), “Application of K-means Algorithm in Image Compression”, IOP Conference Series: Materials Science and Engineering, 563 052042, •B. Reddaiah “A Study on Image Compression and its Applications”, International Journal of Computer Applications, Volume 177 – No. 38, February 2020 •Hartigan, J. A., Wong, M. A. (1979). Algorithm as 136: a k-means clustering algorithm. Journal of the Royal Statistical Society, 28(1), 100-10 •https://www.simplilearn.com/tutorials/machine-learning-tutorial/k-means-clustering-algorithm •Van der Geer, J., Hanraads, J.A.J., Lupton, R.A. (2010) The art of writing a scientific article. J. Sci. Commun., 163: 51–59.