Skip to content

Black Jack card counter that utilises OpenCV to display running count

License

Notifications You must be signed in to change notification settings

mivan50/OpenCV-Blackjack-Counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackjack Card Counter

About the Project

This Blackjack Card Counter, built with Python and utilizing the OpenCV library, allows you to analyze card dealing videos or live video captures. The code can identify any card in view, keep track of the player and dealer hand totals, and provide a running count for card counting.

Key Features:

  • Card Identification: Uses OpenCV for precise card detection and recognition in both videos and live captures.

  • Hand Totals: Keeps track of the player and dealer hand totals for Blackjack.

  • Running Count: Implements card counting with a real-time running count feature.

  • Flexible Input: Supports both video files and live video captures for versatile use.

Preview:

Preview_GIF

🚀 Getting Started

  1. Requirements:

    • Ensure Python is installed.
  2. Install Pygame:

    • Install the required OpenCV library:

      pip install opencv-python
  3. Run the Script:

    • Run the script with:

      python main.py

🎥 Customizing Video Input

By default, the script processes a video file. However, you can customize the input to either use a different video file or enable live video capture.

  1. Change Video File:

    • Open main.py in a text editor.

    • Locate the video_path variable and update it with the path to your desired video file.

      video_path = 'path/to/your/video/file.mp4'
  2. Use Live Video Capture:

    • Open main.py in a text editor.

    • Set video_path to 0 to enable live video capture.

      video_path = 0  # for live video capture

📥 Download

Clone the repository:

git clone https://github.com/mivan50/OpenCV-Blackjack-Counter.git

📝 License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

Black Jack card counter that utilises OpenCV to display running count

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages