From c0b529f2e1255dcee18664836f7ecf7f0d7f68ab Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 30 Oct 2021 20:10:39 +0200 Subject: [PATCH] Move declaration of ThresholdMethod from public API to thresholder.h Signed-off-by: Stefan Weil --- include/tesseract/publictypes.h | 7 ------- src/ccmain/tesseractclass.cpp | 3 ++- src/ccmain/thresholder.h | 8 +++++++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/tesseract/publictypes.h b/include/tesseract/publictypes.h index 32247b130..e4821e91b 100644 --- a/include/tesseract/publictypes.h +++ b/include/tesseract/publictypes.h @@ -278,13 +278,6 @@ enum OcrEngineMode { OEM_COUNT // Number of OEMs }; -enum class ThresholdMethod { - Otsu, // Tesseract's legacy Otsu - LeptonicaOtsu, // Leptonica's Otsu - Sauvola, // Leptonica's Sauvola - Max, // Number of Thresholding methods -}; - } // namespace tesseract. #endif // TESSERACT_CCSTRUCT_PUBLICTYPES_H_ diff --git a/src/ccmain/tesseractclass.cpp b/src/ccmain/tesseractclass.cpp index 76be0cae5..a8cbcd3de 100644 --- a/src/ccmain/tesseractclass.cpp +++ b/src/ccmain/tesseractclass.cpp @@ -46,6 +46,7 @@ # include "equationdetect.h" #endif #include "lstmrecognizer.h" +#include "thresholder.h" // for ThresholdMethod namespace tesseract { @@ -75,7 +76,7 @@ Tesseract::Tesseract() " (Values from PageSegMode enum in tesseract/publictypes.h)", this->params()) , INT_MEMBER(thresholding_method, - static_cast(tesseract::ThresholdMethod::Otsu), + static_cast(ThresholdMethod::Otsu), "Thresholding method: 0 = Otsu, 1 = LeptonicaOtsu, 2 = " "Sauvola", this->params()) diff --git a/src/ccmain/thresholder.h b/src/ccmain/thresholder.h index 602a1b863..e20c065bc 100644 --- a/src/ccmain/thresholder.h +++ b/src/ccmain/thresholder.h @@ -20,7 +20,6 @@ #define TESSERACT_CCMAIN_THRESHOLDER_H_ #include -#include #include // for std::vector @@ -28,6 +27,13 @@ struct Pix; namespace tesseract { +enum class ThresholdMethod { + Otsu, // Tesseract's legacy Otsu + LeptonicaOtsu, // Leptonica's Otsu + Sauvola, // Leptonica's Sauvola + Max, // Number of Thresholding methods +}; + class TessBaseAPI; /// Base class for all tesseract image thresholding classes.