{"id":23632025,"url":"https://github.com/nathanleiby/superset","last_synced_at":"2026-04-27T20:31:26.217Z","repository":{"id":147265035,"uuid":"53278061","full_name":"nathanleiby/superset","owner":"nathanleiby","description":"Play Set better, with technology (www.setgame.com)","archived":false,"fork":false,"pushed_at":"2017-01-09T03:06:16.000Z","size":10614,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T00:11:20.406Z","etag":null,"topics":["computer-vision","opencv"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nathanleiby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-06T21:50:33.000Z","updated_at":"2017-02-25T21:35:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"1bdec002-fce6-41b9-8ee7-c0a6816a64da","html_url":"https://github.com/nathanleiby/superset","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nathanleiby/superset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanleiby%2Fsuperset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanleiby%2Fsuperset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanleiby%2Fsuperset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanleiby%2Fsuperset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nathanleiby","download_url":"https://codeload.github.com/nathanleiby/superset/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanleiby%2Fsuperset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32354564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","opencv"],"created_at":"2024-12-28T03:19:25.341Z","updated_at":"2026-04-27T20:31:26.205Z","avatar_url":"https://github.com/nathanleiby.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Superset\n====\n\n## Setup\n\n### Python Setup\n\nMake a virtual env.\nInstall requirements.\n\n```\nmkvirtualenv superset\nmake deps\n```\n\n### OpenCV2 Setup\n\nFollowed these steps http://www.learnopencv.com/install-opencv-3-on-yosemite-osx-10-10-x/\n\nInstall OpenCV 2 on Mac OSX\n\n```\nbrew tap homebrew/science\nbrew install opencv\n```\n\nBecause running in a Python Virtualenv, we need to get access to OpenCV (installed as a system package). This is possible to do by creating a few symlinks.\n\n```\nln /usr/local/lib/python2.7/site-packages/cv.py cv.py\nln /usr/local/lib/python2.7/site-packages/cv2.so cv2.so\n```\n\nAlternately, could try setting up a Virtualenv with the `--system-site-packages` flag.\n\n## Tests\n\n```\nmake test\n```\n\n## Running locally\n\n```\nmake run\n```\n\n\n**Detect cards**\n\nFind all cards in an image:\n\n```\npython vision.py -c find -f images/game/game001.jpg\n```\n\n\n**Analyze features**\n\nAnalyze a single card:\n\n```\npython vision.py -c analyze -f images/single-card/green-full-oval-1.png\n```\n\nYou can pass the `--display` flag to open a window with images analysis steps.\n\n```\npython vision.py -c analyze -f images/single-card/green-full-oval-1.png --display\n```\n\nIt's also possible to pass a directory.\n`vision.py` will iterate over all `.png` images in that directory.\n\n```\npython vision.py -c analyze -f images/single-card/\n```\n\n-----------\n\n## TODOS\n\n- add more images, and continue tuning algorithm\n- rename fns to better explain the pipeline of steps\n    - detection - find card shaped items in an image\n    - classifaction - is it a card?\n    - feature extraction - given a card, what are its features (shape, number, etc)?\n\n## Ideas to Explore\n\n- morphology ex (for estimated rectangle shape of set cards)\n    - http://docs.opencv.org/2.4/modules/imgproc/doc/filtering.html#createmorphologyfilter\n- Template matching\n    - http://docs.opencv.org/2.4/doc/tutorials/imgproc/histograms/template_matching/template_matching.html\n\t- http://docs.opencv.org/3.1.0/d4/dc6/tutorial_py_template_matching.html\n\t- with scaling - http://www.pyimagesearch.com/2015/01/26/multi-scale-template-matching-using-python-opencv/\n- Shape Detection\n\t- http://www.pyimagesearch.com/2016/02/08/opencv-shape-detection/\n\t- http://stackoverflow.com/questions/11424002/how-to-detect-simple-geometric-shapes-using-opencv\n- Square detection\n\t- http://stackoverflow.com/questions/8667818/opencv-c-obj-c-detecting-a-sheet-of-paper-square-detection\n\t- http://stackoverflow.com/questions/10533233/opencv-c-obj-c-advanced-square-detection\n- Circle detection\n\t- http://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/hough_circle/hough_circle.html#hough-circle\n- OpenCV Python examples\n\t- https://github.com/opencv/opencv/tree/master/samples/python\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanleiby%2Fsuperset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathanleiby%2Fsuperset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanleiby%2Fsuperset/lists"}