{ "info": { "author": "Matt Yan", "author_email": "syan4@ualberta.ca", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": "# whichimg\n![travis-badge](https://travis-ci.org/Madoshakalaka/whichimg.svg?branch=master)\n\nblazing fast template matching when possible images are all known. Handy tool for GUI scripting.\n\n\n## How to Use\n\nIt supports python 3.6 +\n\n`pip install whichimg`\n\n\n```python\nfrom whichimg import ImageTeller\n\nteller = ImageTeller([img1, img2, img3, img4]) # numpy arrays\n\nteller.tell(secret_img) # returns 0 or 1 or 2 or 3 or -1 for not found\n\n```\n\nif you're sure `secret_img` is one of the images, you can set keyword argument `surprises` to `False`. This will give you a minor performance gain.\n```python\nteller = ImageTeller([img1, img2, img3, img4], surprises=False)\n```\n\nThis is equivalent to the following naive approach\n\n```python\ndef naive_tell(images, sample_img):\n for i, img in enumerate(images):\n if np.array_equal(img, sample_img):\n return i\n return -1\n\nnaive_tell([img1, img2, img3, img4], secret_img)\n```\n\n\n\n## Note\n\nIt's **not** generally faster than the naive approach. I thought my approach was faster and spent a week writing this shit though. lmfao.\n\nThey're about equally fast on the `tests/fixtures` testing data I came up with (10x10 images). Through my rough testing, there could be a magnitude of performance gain when there are many possible images (>10) and when the images are larger (200x200 for example).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Madoshakalaka/whichimg", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "whichimg", "package_url": "https://pypi.org/project/whichimg/", "platform": "", "project_url": "https://pypi.org/project/whichimg/", "project_urls": { "Bug Reports": "https://github.com/Madoshakalaka/whichimg/issues", "Funding": "https://github.com/Madoshakalaka/whichimg", "Homepage": "https://github.com/Madoshakalaka/whichimg", "Say Thanks!": "https://github.com/Madoshakalaka/whichimg", "Source": "https://github.com/Madoshakalaka/whichimg" }, "release_url": "https://pypi.org/project/whichimg/1.0.5/", "requires_dist": null, "requires_python": ">=3.6", "summary": "blazing fast template matching when possible images are all known. Good for GUI scripting.", "version": "1.0.5" }, "last_serial": 5496373, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "7d99ba51b3fe2888113eb77c86a2d973", "sha256": "5909f24a6617532635e8d24b259783841f9142cea2e0921e59da20c43f5508f9" }, "downloads": -1, "filename": "whichimg-0.0.0.tar.gz", "has_sig": false, "md5_digest": "7d99ba51b3fe2888113eb77c86a2d973", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4689, "upload_time": "2019-07-01T07:57:16", "url": "https://files.pythonhosted.org/packages/b6/b6/e99cf72a4880b9645e2b6ab3d58d1429fbf7611e6f5e21be0a1066d8d51f/whichimg-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "cae28a77a5c5743055a54d8ce048aacc", "sha256": "6bdb3a19a89f459b0795c66c541913c643d04923db726880e31e37ebc951a9b0" }, "downloads": -1, "filename": "whichimg-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cae28a77a5c5743055a54d8ce048aacc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4697, "upload_time": "2019-07-07T06:24:33", "url": "https://files.pythonhosted.org/packages/84/b9/4c57fadb477a94cf2ca3af73d7c79474dbbadd598b84b973283143bc4514/whichimg-0.0.1.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "6e9af7236507bb4c47a64901bf88ffdd", "sha256": "44035ff1ebc94002a98794865c316b0d8138332a594f7473db4f070a74542cca" }, "downloads": -1, "filename": "whichimg-1.0.3.tar.gz", "has_sig": false, "md5_digest": "6e9af7236507bb4c47a64901bf88ffdd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 7362, "upload_time": "2019-07-07T06:38:55", "url": "https://files.pythonhosted.org/packages/92/3c/28415b9927da9261d8e4df2795d6560a5e7d0b2524e1cb7e57d7a8b84607/whichimg-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "86cbd9a632a8e16bda9c456783bb05d0", "sha256": "882b131b4491e5b4f9e1310cc482a0dfd9b780bcb0efa1fd240533175de9b97b" }, "downloads": -1, "filename": "whichimg-1.0.4.tar.gz", "has_sig": false, "md5_digest": "86cbd9a632a8e16bda9c456783bb05d0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 7365, "upload_time": "2019-07-07T06:49:04", "url": "https://files.pythonhosted.org/packages/71/f4/46345d196daf8d29b8f7c5859c3357aa44e50e028b7c2bbf41858a6c1733/whichimg-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "7f8dcf6de1e1027583638b211a726722", "sha256": "05453cb5207b953b434c0db51852e7fba7dfaf5e4b79f2ffe1f43d54f477f8bc" }, "downloads": -1, "filename": "whichimg-1.0.5.tar.gz", "has_sig": false, "md5_digest": "7f8dcf6de1e1027583638b211a726722", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 7358, "upload_time": "2019-07-07T06:55:50", "url": "https://files.pythonhosted.org/packages/1f/8d/f66e437b8c59fc5a2a96148363380069f75938a873c7221d4725fa0ed75f/whichimg-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7f8dcf6de1e1027583638b211a726722", "sha256": "05453cb5207b953b434c0db51852e7fba7dfaf5e4b79f2ffe1f43d54f477f8bc" }, "downloads": -1, "filename": "whichimg-1.0.5.tar.gz", "has_sig": false, "md5_digest": "7f8dcf6de1e1027583638b211a726722", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 7358, "upload_time": "2019-07-07T06:55:50", "url": "https://files.pythonhosted.org/packages/1f/8d/f66e437b8c59fc5a2a96148363380069f75938a873c7221d4725fa0ed75f/whichimg-1.0.5.tar.gz" } ] }