- It can still be used even in low-light or highly reflective environments.
- Can be quickly implemented on other card types by taking a group of photos and marking the label.
- Take a photo of a group of cards and record the labels in the text file in sequence, from left to right in the photos.
- You can take more than one photo and more than one text file, just put them into
training_image_filename_list
andtraining_labels_filename_list
in the filecard_detection.py
in order. - The default is to take the corners of the picture to identify playing cards. If you want to identify other types of cards, you need to compare the entire card. It can be done by modifying the function
preprocess
incard_detection.py
. - Execute
card_detection.py
, the parameter is the photo to be identified.python ./card_detection.py {photo path}
- Use the threshold value obtained by the Otsu algorithm to do binarization to avoid adverse light effects.
- Using a specially designed adaptive threshold, you can see that most of the information can be retained even if the reflection is severe.
- Calculate the sum of the difference between the intensity value of each pixel of the labeled card and the query card. The label of the card with the smallest value difference is the recognition result.