Opencv playing card recognition ios video

broken image
broken image

To do this, run Rank_Suit_Isolator.py to take pictures of your cards. The card detector will work best if you use isolated rank and suit images generated from your own cards. Videostream = VideoStream.VideoStream((IM_WIDTH,IM_HEIGHT),FRAME_RATE,2,0).start() If using a USB camera, change line 38 in CardDetector.py to: The program allows you to use either a PiCamera or a USB camera. If you are running this on Windows, you will also need to change the program to use a USB camera, as described below. The Anaconda environment comes with the opencv and numpy packages installed, so you don't need to install those yourself. To run on Windows, download and install Anaconda (, Python 3.6 version), launch Anaconda Prompt, and execute the program by launching IDLE (type 'idle' and press ENTER in the prompt) and opening/running the CardDetector.py file in IDLE.

broken image
broken image

The program was originally designed to run on a Raspberry Pi with a Linux OS, but it can also be run on Windows 7/8/10. Cards need to be placed on a dark background for the detector to work. Check out the YouTube video that describes what it does and how it works:ĭownload this repository to a directory and run CardDetector.py from that directory. This is a Python program that uses OpenCV to detect and identify playing cards from a PiCamera video feed on a Raspberry Pi.

broken image