Git Product home page Git Product logo

imagecompress's Introduction

ImageCompress

K-means聚类算法实现图片的压缩,Python实现

更新

  • 2018-03-19 修改代码格式,封装成对象
  • 2017-09-06 增加使用TensorFlow实现(实测速度比纯python+numpy慢)

参数

  • K 全图用多少种颜色表示,默认值 K=16,设置K后将会对所有图像进行聚类,并只使用K种颜色表示全图
  • iter 迭代计算次数, 默认值 iter=3

未实现

  • 未实现压缩后的存储(降低图像文件大小),只能存为一般jpg格式预览压缩后效果

效果

默认参数下的效果

第一张图片

第一张图片压缩

第二张图片

第二张图片压缩

imagecompress's People

Contributors

sherlockunknowen avatar

Watchers

James Cloos 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.