{"id":25313,"date":"2017-02-06T00:40:20","date_gmt":"2017-02-06T05:40:20","guid":{"rendered":"http:\/\/www.dannyadam.com\/blog\/?p=25313"},"modified":"2017-02-07T00:02:12","modified_gmt":"2017-02-07T05:02:12","slug":"k-means-image-color-quantization","status":"publish","type":"post","link":"https:\/\/www.dannyadam.com\/blog\/2017\/02\/k-means-image-color-quantization\/","title":{"rendered":"<em>k<\/em>-means Image Color Quantization"},"content":{"rendered":"<p>I implemented a web page that can apply\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Color_quantization\">color quantization<\/a>\u00a0to images using\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/K-means_clustering\"><em>k<\/em>-means clustering<\/a>. Here&#8217;s the link:<br \/>\n<a href=\"https:\/\/dstein64.github.io\/k-means-quantization-js\/\">https:\/\/dstein64.github.io\/k-means-quantization-js\/<\/a><\/p>\n<p>The JavaScript source code is available on GitHub:<br \/>\n<a href=\"https:\/\/github.com\/dstein64\/k-means-quantization-js\">https:\/\/github.com\/dstein64\/k-means-quantization-js<\/a><\/p>\n<p><!--more-->Below\u00a0are some examples of quantized images.<\/p>\n<div id='gallery-1' class='gallery galleryid-25313 gallery-columns-2 gallery-size-large'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/www.dannyadam.com\/blog\/wp-content\/uploads\/2017\/02\/1485056542642912100-0009-X2-quantized.png'><img loading=\"lazy\" decoding=\"async\" width=\"436\" height=\"959\" src=\"https:\/\/www.dannyadam.com\/blog\/wp-content\/uploads\/2017\/02\/1485056542642912100-0009-X2-quantized.png\" class=\"attachment-large size-large\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/www.dannyadam.com\/blog\/wp-content\/uploads\/2017\/02\/1485056542642912100-0007-X2-quantized.png'><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"959\" src=\"https:\/\/www.dannyadam.com\/blog\/wp-content\/uploads\/2017\/02\/1485056542642912100-0007-X2-quantized.png\" class=\"attachment-large size-large\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/www.dannyadam.com\/blog\/wp-content\/uploads\/2017\/02\/1485664688195260300-0001-X2-quantized.png'><img loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"870\" src=\"https:\/\/www.dannyadam.com\/blog\/wp-content\/uploads\/2017\/02\/1485664688195260300-0001-X2-quantized.png\" class=\"attachment-large size-large\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/www.dannyadam.com\/blog\/wp-content\/uploads\/2017\/02\/1485056542642912100-0003-X2-quantized.png'><img loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"492\" src=\"https:\/\/www.dannyadam.com\/blog\/wp-content\/uploads\/2017\/02\/1485056542642912100-0003-X2-quantized.png\" class=\"attachment-large size-large\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure>\n\t\t<\/div>\n\n<p>The originals are available on\u00a0<a href=\"http:\/\/photos.dannyadam.com\/\">http:\/\/photos.dannyadam.com\/<\/a>.<\/p>\n<ul>\n<li><a href=\"http:\/\/photos.dannyadam.com\/Gallery\/i-KP2pPW6\">Meerkat<\/a><\/li>\n<li><a href=\"http:\/\/photos.dannyadam.com\/Gallery\/i-m4bK5vb\">Giraffe<\/a><\/li>\n<li><a href=\"http:\/\/photos.dannyadam.com\/Gallery\/i-ZtDsnDM\">Condor<\/a><\/li>\n<li><a href=\"http:\/\/photos.dannyadam.com\/Gallery\/i-bB6ZWwz\">Elephant<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I implemented a web page that can apply\u00a0color quantization\u00a0to images using\u00a0k-means clustering. Here&#8217;s the link: https:\/\/dstein64.github.io\/k-means-quantization-js\/ The JavaScript source code is available on GitHub: https:\/\/github.com\/dstein64\/k-means-quantization-js<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[51,41,50,46,42],"class_list":["post-25313","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-image-color-quantization","tag-javascript","tag-k-means-clustering","tag-machine-learning","tag-photography"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1sCC6-6Ah","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dannyadam.com\/blog\/wp-json\/wp\/v2\/posts\/25313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dannyadam.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dannyadam.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dannyadam.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dannyadam.com\/blog\/wp-json\/wp\/v2\/comments?post=25313"}],"version-history":[{"count":21,"href":"https:\/\/www.dannyadam.com\/blog\/wp-json\/wp\/v2\/posts\/25313\/revisions"}],"predecessor-version":[{"id":25975,"href":"https:\/\/www.dannyadam.com\/blog\/wp-json\/wp\/v2\/posts\/25313\/revisions\/25975"}],"wp:attachment":[{"href":"https:\/\/www.dannyadam.com\/blog\/wp-json\/wp\/v2\/media?parent=25313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dannyadam.com\/blog\/wp-json\/wp\/v2\/categories?post=25313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dannyadam.com\/blog\/wp-json\/wp\/v2\/tags?post=25313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}