Blackjack Decision Maker
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CardTemplate Class Reference

Class to load and store the template cards from a folder path. More...

#include <CardDiscriminator.h>

Collaboration diagram for CardTemplate:

Public Member Functions

 CardTemplate (cv::String folder)
 Construct a new Card Template object. Template cards are defined as constant. The following procedure (initialiser list) is required to set a const in runtime. More...
 
cv::Mat getCard (int index)
 Get the Card object. More...
 
cv::String getCardRank (int index)
 Get the Card name. More...
 

Static Public Member Functions

static TemplateImages init (cv::String folder, bool suit_flag)
 Init function to parse the folder path and read the template card images. More...
 

Public Attributes

const int num_template_cards
 

Detailed Description

Class to load and store the template cards from a folder path.

Constructor & Destructor Documentation

◆ CardTemplate()

CardTemplate::CardTemplate ( cv::String  folder)
inline

Construct a new Card Template object. Template cards are defined as constant. The following procedure (initialiser list) is required to set a const in runtime.

Similarly set the num_template_cards variable.

Parameters
folderis a string to the folder path

Member Function Documentation

◆ getCard()

cv::Mat CardTemplate::getCard ( int  index)
inline

Get the Card object.

Parameters
indexindex of card in rank_images object
Returns
cv::Mat single template card at index location

◆ getCardRank()

cv::String CardTemplate::getCardRank ( int  index)
inline

Get the Card name.

Parameters
indexindex of card in rank_images object
Returns
cv::String name of detected card

◆ init()

static TemplateImages CardTemplate::init ( cv::String  folder,
bool  suit_flag 
)
inlinestatic

Init function to parse the folder path and read the template card images.

Parameters
folderis a string to the folder path
suit_flagboolean to distinguish between loading of ranks or suit images
Returns
TemplateImages

Member Data Documentation

◆ num_template_cards

const int CardTemplate::num_template_cards

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