{ "info": { "author": "Tristan Kernan", "author_email": "russon77@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "=========================\nHearthstone Card Detector\n=========================\nTo use (with caution), simply do::\n\n >>> from hearthstonecarddetector import image_to_card_id\n >>> from PIL import Image\n >>> with Image.open(\"test_image_here.ext\") as img:\n >>> # if image is not cropped, perform the crop now\n >>> img = img.crop(bbox=(x1, y1, x2, y2))\n >>> card_id = image_to_card_id(img)\n >>> print(card_id)\n\nIt's that simple!\n\ndb\n^^\nThe most interesting part of this module is the hashing of all the cards.\nThe hashes are taken of only a certain crop of the card image, a good portion\nof the artwork. This is explained in \"crop_explained.png\" and you can see\nthe examples in the tests folder for more help.\n\nEach card was hashed in the four ways provided by the imagehash library. These are\naverage_hash, dhash, phash, and whash. phash is the default algorithm used in this\nmodule.\n\nTests and Examples\n^^^^^^^^^^^^^^^^^^\nPlease take a look at the tests directory. You will find several images\nthat are cropped appropriately, in order to match. The TestDetector.py file\nalso contains a working code example.\n\nPlease examine the file \"crop_explained.png\" for information about\nspecific areas to crop. For even more information, you can find the\nentire collection of cropped images that were used to create these hashes\nonline at https://s3.amazonaws.com/draftwithme/hashed_images/ + CARD_ID .png.\nFor example, the first card is linked at\n\"https://s3.amazonaws.com/draftwithme/hashed_images/AT_001.png\".\n\nFuture Work\n^^^^^^^^^^^\nIdeally, this library should support working with full card images. The problem\nwas that the bottom half of cards are all too similar, so hashing the full image\nended up with lots of errors. Focusing on the card artwork has provided a lot of\nsuccess.\n\nOne idea for improvement is to organize the cards by mana (and subsequently by attack / health).\nThen, parse each of these individually and compare some region to the region previously hashed and indexed.\n\n\nLicense\n^^^^^^^\nThe MIT License (MIT)\n\nCopyright (c) 2016 Tristan Kernan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and\nassociated documentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial\nportions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT\nLIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\nOR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.com/russon77/hearthstonecarddetector", "keywords": "hearthstone", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "hearthstonecarddetector", "package_url": "https://pypi.org/project/hearthstonecarddetector/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/hearthstonecarddetector/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://www.github.com/russon77/hearthstonecarddetector" }, "release_url": "https://pypi.org/project/hearthstonecarddetector/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "match a specific cropped image to a hearthstone card id", "version": "0.1.4" }, "last_serial": 2289518, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "6b51cb0dec1978673e28d53c4e3fc865", "sha256": "bf08c6c6e76803e9484ed324d5318cc24dec970ad5408b150078aeee8a06208f" }, "downloads": -1, "filename": "hearthstonecarddetector-0.1.zip", "has_sig": false, "md5_digest": "6b51cb0dec1978673e28d53c4e3fc865", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 292485, "upload_time": "2016-08-08T23:23:52", "url": "https://files.pythonhosted.org/packages/fe/e9/b9c5e7192c2aa41517ebbc27ccda2b4928888cec35ccefff9c09773302c4/hearthstonecarddetector-0.1.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c82e6bfa17444966eff9c9f677e7a4ce", "sha256": "b7002aca5f0356d43d8417799de050c0f3cd272560106f8fe1e92a7ada11948c" }, "downloads": -1, "filename": "hearthstonecarddetector-0.1.1.zip", "has_sig": false, "md5_digest": "c82e6bfa17444966eff9c9f677e7a4ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 294386, "upload_time": "2016-08-09T17:13:55", "url": "https://files.pythonhosted.org/packages/52/fc/341f7a747b7d45306c02519c8883cd8637f064275bfc4ee108b83ec41921/hearthstonecarddetector-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3c8d13a614e2f8fa8152720374a86523", "sha256": "24b02510ad3dec6d791fd5855779823828e5b10a9efd65e0d9fa92b4cbc89f39" }, "downloads": -1, "filename": "hearthstonecarddetector-0.1.2.zip", "has_sig": false, "md5_digest": "3c8d13a614e2f8fa8152720374a86523", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 302003, "upload_time": "2016-08-18T19:34:54", "url": "https://files.pythonhosted.org/packages/05/94/ce98118fbbcfa9f36a1a8704f8d8c1fcec44e08a2ab0108a80a928809780/hearthstonecarddetector-0.1.2.zip" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "955b2dc75225d040750b2ffa2cf5973a", "sha256": "d38a785323fcfdd0a4a889e8bc449ef26043d8b9fc19f6c46a1e8140af66d8ae" }, "downloads": -1, "filename": "hearthstonecarddetector-0.1.3.zip", "has_sig": false, "md5_digest": "955b2dc75225d040750b2ffa2cf5973a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 301760, "upload_time": "2016-08-18T19:48:48", "url": "https://files.pythonhosted.org/packages/b7/5a/a9dc99f546a576c765570d5e73aa0325681169733e106216027f545ff673/hearthstonecarddetector-0.1.3.zip" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "7cf58f50b7c680d1bcd6b83a3605ce28", "sha256": "8d03464fc7b3e7e9d14da257eea3b0568df8a097c664c8cba675eef1fed158cc" }, "downloads": -1, "filename": "hearthstonecarddetector-0.1.4.zip", "has_sig": false, "md5_digest": "7cf58f50b7c680d1bcd6b83a3605ce28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 301760, "upload_time": "2016-08-18T20:16:18", "url": "https://files.pythonhosted.org/packages/f0/a1/44754cb61375be85319d51dfe5220a10f909ddcff497c6e125ab5addfcd9/hearthstonecarddetector-0.1.4.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7cf58f50b7c680d1bcd6b83a3605ce28", "sha256": "8d03464fc7b3e7e9d14da257eea3b0568df8a097c664c8cba675eef1fed158cc" }, "downloads": -1, "filename": "hearthstonecarddetector-0.1.4.zip", "has_sig": false, "md5_digest": "7cf58f50b7c680d1bcd6b83a3605ce28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 301760, "upload_time": "2016-08-18T20:16:18", "url": "https://files.pythonhosted.org/packages/f0/a1/44754cb61375be85319d51dfe5220a10f909ddcff497c6e125ab5addfcd9/hearthstonecarddetector-0.1.4.zip" } ] }