Blackjack Decision Maker
Public Member Functions | List of all members
CardDiscriminator Class Reference

Class to implement detection method from Card Rank ROIs. Can be adapted for other solutions such as machine learning. More...

#include <CardDiscriminator.h>

Collaboration diagram for CardDiscriminator:

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...
 

Detailed Description

Class to implement detection method from Card Rank ROIs. Can be adapted for other solutions such as machine learning.

Constructor & Destructor Documentation

◆ CardDiscriminator()

CardDiscriminator::CardDiscriminator ( cv::String  folder_path)

Construct a new Card Discriminator:: Card Discriminator object.

Parameters
folder_pathget folder path of template cards and call cardTemplates constructor to load all templates

Member Function Documentation

◆ template_matching()

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.

Parameters
paramsstructure holding all parameters of card-shaped objects
rankboolean, can be used to select detection of rank (== true) or suit (== false). Suit detection is currently not implemented.

The documentation for this class was generated from the following files: