{ "info": { "author": "Joe Cross", "author_email": "joe.mcross@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "kmeans\n===================\n.. image:: https://travis-ci.org/numberoverzero/kmeans.png?branch=master\n :target: https://travis-ci.org/numberoverzero/kmeans\n\npython wrapper for a basic c implementation of the k-means algorithm.\n\n**Please review the limitations before using in any capacity where strict\naccuracy is required. There is no overflow detection, and negatives are not\nsupported. tuple values cannot exceed 255.**\n\nInstallation\n===================\n::\n\n pip install kmeans\n\nUsage\n===================\n::\n\n import kmeans\n means = kmeans.kmeans(points, k)\n\n``points`` should be a list of tuples of the form ``(data, weight)`` where\n``data`` is a list with length 3.\n\nFor example, finding four mean colors for a group of pixels::\n\n pixels = [\n [(15, 20, 25), 1], # [(r,g,b), count]\n [(17, 31, 92), 5],\n # ... Lots more ...\n ]\n\n centers = kmeans.kmeans(pixels, 4)\n\nIn this case, the weights passed in may be the frequency of the pixels occuring\nin an image, or some preference to pull the means towards a color.\n\nLimitations\n===================\n\nAll values must be **non-negative** **integers**, with the following\nrestrictions::\n\n r, g, b [0, 255] (uint8_t)\n count [0, 4294967295] (uint32_t)\n maximum points 4294967296 (uint32_t)\n maximum means 256 (uint8_t)\n max iterations 65536 (uint16_t)\n max tolerance 65536 (uint16_t)\n\n\nInspiration\n===================\n\nhttp://charlesleifer.com/blog/using-python-to-generate-awesome-linux-desktop-themes/\n\nI wanted to apply the implementation there to images much larger than 200x200.\nRunning a 4k x 3k image was approaching 60 seconds on a nice computer, so I\ndecided to rewrite the kmeans implementation in c.\n\nContributors\n===================\n\n* chinatsu_ - 32bit compatibility\n\n.. _chinatsu: https://github.com/chinatsu", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/numberoverzero/kmeans/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "kmeans", "package_url": "https://pypi.org/project/kmeans/", "platform": "any", "project_url": "https://pypi.org/project/kmeans/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/numberoverzero/kmeans/" }, "release_url": "https://pypi.org/project/kmeans/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "python wrapper for basic c implementation of kmeans", "version": "1.0.2" }, "last_serial": 1479614, "releases": { "0.1": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "29c868cfa48848ab0d6a98efa6fd3260", "sha256": "616f3e36149cf2ffff086732a42ede25ed5979e0d1f6361b6d98cb700f6c43b2" }, "downloads": -1, "filename": "kmeans-0.1.1.tar.gz", "has_sig": false, "md5_digest": "29c868cfa48848ab0d6a98efa6fd3260", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2476, "upload_time": "2013-08-25T01:02:25", "url": "https://files.pythonhosted.org/packages/e1/08/8fb35b837f78dd4cef914b513539ed1bff52b6c111816e9257f929994bff/kmeans-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "e47e22697bfb22f40b125e5a71a85143", "sha256": "305480adb388780f1da14804c451e5804733100af2d0373426d041acf709a893" }, "downloads": -1, "filename": "kmeans-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e47e22697bfb22f40b125e5a71a85143", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3898, "upload_time": "2013-08-25T06:13:21", "url": "https://files.pythonhosted.org/packages/4c/39/0c2c03364978e2af9822a7eaa895260b205a295a53b1512970447c3439b5/kmeans-0.2.0.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "ebf86e0f9405a81a2032515a6edcd998", "sha256": "f8dc76916f0e41cba6f7b3931f307271096a8ebc8d6461b6bd52b0930201981c" }, "downloads": -1, "filename": "kmeans-0.2.2.tar.gz", "has_sig": false, "md5_digest": "ebf86e0f9405a81a2032515a6edcd998", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3944, "upload_time": "2013-08-25T20:50:52", "url": "https://files.pythonhosted.org/packages/d4/ea/7c060f650ff48f99b6016921cc40935363ce4b4b025e52809dec6cf13730/kmeans-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "5db32e4f6e0ca78a143b8e6aa3f8373f", "sha256": "6531c417aefd3289f271cfba42250b2b7e1f3e3cad803ac11900182aeaf6627c" }, "downloads": -1, "filename": "kmeans-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5db32e4f6e0ca78a143b8e6aa3f8373f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3707, "upload_time": "2014-06-13T06:51:52", "url": "https://files.pythonhosted.org/packages/34/4d/28787936acc315d044d16224737a51efe96ffaa61ca860bdc65af08947d8/kmeans-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "e1bc083bb34fc1dfcf561a00075ccfc9", "sha256": "920bca7c3f9c8653bb18e2810b11c3ef8e90b4f67f79bcd22169f152e0e44605" }, "downloads": -1, "filename": "kmeans-0.3.1.tar.gz", "has_sig": false, "md5_digest": "e1bc083bb34fc1dfcf561a00075ccfc9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3856, "upload_time": "2014-06-13T07:18:17", "url": "https://files.pythonhosted.org/packages/8a/88/29eacf34eb44aa9d5b8d6b921249c7ef81899eacf040c93651aaf07d4951/kmeans-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "eefb2e2ed9d9bc49bc8ecf1b4256a8eb", "sha256": "f65da3ae155c03cae38d83fc59ddb2331f2293486272e0a1ee57913e5895d1f6" }, "downloads": -1, "filename": "kmeans-0.3.2.tar.gz", "has_sig": false, "md5_digest": "eefb2e2ed9d9bc49bc8ecf1b4256a8eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3881, "upload_time": "2014-06-16T02:20:32", "url": "https://files.pythonhosted.org/packages/c9/09/0322905515084c541790aaa48504d087a48cfe712bfd738fb998043dc8e9/kmeans-0.3.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "21d63afde8bca20c23e90ae4b038225e", "sha256": "82e0ce8ea24e7c4e1df3a3a63d880f90f5421a9fb95fafc6a6ecfb752b3e01f1" }, "downloads": -1, "filename": "kmeans-1.0.0.tar.gz", "has_sig": false, "md5_digest": "21d63afde8bca20c23e90ae4b038225e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5618, "upload_time": "2014-10-24T08:36:39", "url": "https://files.pythonhosted.org/packages/91/82/7f672ea949273844b569e3b6be847998ea95501a3fc65267bdf333d3ac07/kmeans-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "c1ae0e4577706447da1a3b5f3e6d49f2", "sha256": "ddde2e747f8dca86a5e073619d76dcafd90cc8eecb72c39fa06573f8d26fb28b" }, "downloads": -1, "filename": "kmeans-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c1ae0e4577706447da1a3b5f3e6d49f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5766, "upload_time": "2014-10-24T08:43:38", "url": "https://files.pythonhosted.org/packages/8f/4e/388e41ec3296ced123cad533d5c518206039d65eb2cbd367f340012fe181/kmeans-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "7b042b9ea3fbe111afe920b70ee15b36", "sha256": "96c4d7410bcd251e583eb2b817d133e678453d6ef7c5773f1263345eb47c24e2" }, "downloads": -1, "filename": "kmeans-1.0.2.tar.gz", "has_sig": false, "md5_digest": "7b042b9ea3fbe111afe920b70ee15b36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5860, "upload_time": "2015-03-27T02:49:19", "url": "https://files.pythonhosted.org/packages/d1/7e/87d12a99d7ccfd2c85b19899012177e1718c2d6c0148fad421523160e84b/kmeans-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7b042b9ea3fbe111afe920b70ee15b36", "sha256": "96c4d7410bcd251e583eb2b817d133e678453d6ef7c5773f1263345eb47c24e2" }, "downloads": -1, "filename": "kmeans-1.0.2.tar.gz", "has_sig": false, "md5_digest": "7b042b9ea3fbe111afe920b70ee15b36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5860, "upload_time": "2015-03-27T02:49:19", "url": "https://files.pythonhosted.org/packages/d1/7e/87d12a99d7ccfd2c85b19899012177e1718c2d6c0148fad421523160e84b/kmeans-1.0.2.tar.gz" } ] }