Blackjack Decision Maker
|
Class to implement detection method from Card Rank ROIs. Can be adapted for other solutions such as machine learning. More...
#include <CardDiscriminator.h>
Public Member Functions | |
CardDiscriminator (cv::String folder_path) | |
Construct a new Card Discriminator:: Card Discriminator object. More... | |
void | template_matching (Card_params &Card_params, bool rank) |
Template matching method is responsible for determining the card Rank. In this release, the matching method is a simple absolute difference of the Rank ROI against a template image, however future releases could incorporate a completely different solution, such as a Machine Learning model, recognising numbers and letters. More... | |
Class to implement detection method from Card Rank ROIs. Can be adapted for other solutions such as machine learning.
CardDiscriminator::CardDiscriminator | ( | cv::String | folder_path | ) |
Construct a new Card Discriminator:: Card Discriminator object.
folder_path | get folder path of template cards and call cardTemplates constructor to load all templates |
void CardDiscriminator::template_matching | ( | Card_params & | params, |
bool | rank | ||
) |
Template matching method is responsible for determining the card Rank. In this release, the matching method is a simple absolute difference of the Rank ROI against a template image, however future releases could incorporate a completely different solution, such as a Machine Learning model, recognising numbers and letters.
params | structure holding all parameters of card-shaped objects |
rank | boolean, can be used to select detection of rank (== true) or suit (== false). Suit detection is currently not implemented. |