Skip to content

Commit 48ebd08

Browse files
committed
Renamed class variables to better show their purpose.
1 parent 7efcc39 commit 48ebd08

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

ReadMagicCard/CardReader.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ wstring CardReader::GetImageFileName() {
2828

2929
bool CardReader::GetSuccess() {
3030

31-
return m_success;
31+
return finalTitleExtractionSuccess;
3232
}
3333

3434
int CardReader::GetConfidence() {
3535

36-
return m_confidence;
36+
return finalTitleOcrConfidence;
3737
}
3838

3939
wstring CardReader::ExtractCardName() {
@@ -75,7 +75,7 @@ wstring CardReader::readTitle(Mat cardImage) {
7575
//The method reading the title returns an empty result if it failed.
7676
if (result.Confidence > 0) {
7777

78-
m_success = true;
78+
finalTitleExtractionSuccess = true;
7979
return result.Text;
8080
}
8181

@@ -88,7 +88,7 @@ wstring CardReader::readTitle(Mat cardImage) {
8888
//The method reading the title returns an empty result if it failed.
8989
if (result.Confidence > 0) {
9090

91-
m_success = true;
91+
finalTitleExtractionSuccess = true;
9292
return result.Text;
9393
}
9494

@@ -186,7 +186,7 @@ void CardReader::storeOcrConfidence(OcrDecodeResult result, int numberOfTries) {
186186
storer.StoreOcrConfidence(imageFileName, numberOfTries, result.Text, result.Confidence);
187187
}
188188

189-
m_confidence = result.Confidence;
189+
finalTitleOcrConfidence = result.Confidence;
190190
}
191191

192192
vector<Mat> CardReader::getSplitCardHalves(const Mat& originalCardImage, CardTitleType titleType) {

ReadMagicCard/CardReader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ class CardReader :
4343
void cropImageToTitleSection(const cv::Mat rawCardImage, cv::Mat& outImages, CardTitleType type);
4444

4545
//Tells if the extraction was successfull.
46-
bool m_success = false;
46+
bool finalTitleExtractionSuccess = false;
4747
//Tells how confident Tesseract was of decoding the title.
48-
int m_confidence = 0;
48+
int finalTitleOcrConfidence = 0;
4949
//The number of title images of the card the debug algorithm has stored to disk.
5050
int numberOfOcrTitlesStoredForDebug;
5151
//The number of times the algorithm has tried to read the card.

0 commit comments

Comments
 (0)