https://github.com/dofire/opencv-playing-card-detection
detect playing cards using OpenCV and Python ♥️♠️♦️♣️
https://github.com/dofire/opencv-playing-card-detection
ipynb jupyter-notebook opencv opencv-python playing-cards-detection python
Last synced: 8 months ago
JSON representation
detect playing cards using OpenCV and Python ♥️♠️♦️♣️
- Host: GitHub
- URL: https://github.com/dofire/opencv-playing-card-detection
- Owner: dofire
- Created: 2023-11-28T06:39:13.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T13:39:22.000Z (over 2 years ago)
- Last Synced: 2025-03-24T15:52:36.513Z (about 1 year ago)
- Topics: ipynb, jupyter-notebook, opencv, opencv-python, playing-cards-detection, python
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 10
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenCV 🃏 Playing Card Detection ♥️♠️♦️♣️
The user simply puts the card on a flat surface, and the program will
- threshold the image
- find the card
- isolate the corners
- split it into rank and suit
- compare with the stored rank/suit images and then show the results
## Demo
| ♥️♠️ demo ♦️♣️ |
| :-: |
|
|
|
|
> For more information, refer to [Jupyter Notebook](main.ipynb)
## Setup (for testing)
- run `installation.ipynb` to install the required packages (or install packages manually)
- setup local `venv` or anaconda env, then hit run `main.py` (or just use `main.ipynb` instead)
- **(For Testing)** Because the `test` folder is quite large (100+ MB), you guys will have to download the `.zip` folder and then extract it into the root directory in order to test the code, which is under `releases` section
## Used Packages
- `Python 3.11.5`
- `opencv`
- `numpy`
- `matplotlib`
- `jupyter notebook`
## References
- [EdjeElectronics/OpenCV-Playing-Card-Detector](https://github.com/EdjeElectronics/OpenCV-Playing-Card-Detector)
- [dharm1k987/Card_Recognizer](https://github.com/dharm1k987/Card_Recognizer)
- [youtube](https://www.youtube.com/watch?v=s2jYdsjWirs)