Remove TessBaseAPI::SetThresholder (API change)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2021-03-23 08:55:56 +01:00
parent 7d70ed4b41
commit 1205f036ea
2 changed files with 2 additions and 24 deletions

View File

@ -335,15 +335,6 @@ public:
*/
void SetRectangle(int left, int top, int width, int height);
/**
* In extreme cases only, usually with a subclass of Thresholder, it
* is possible to provide a different Thresholder. The Thresholder may
* be preloaded with an image, settings etc, or they may be set after.
* Note that Tesseract takes ownership of the Thresholder and will
* delete it when it it is replaced or the API is destructed.
*/
void SetThresholder(ImageThresholder *thresholder);
/**
* Get a copy of the internal thresholded image from Tesseract.
* Caller takes ownership of the Pix and must pixDestroy it.

View File

@ -215,8 +215,8 @@ TessBaseAPI::TessBaseAPI()
, equ_detect_(nullptr)
, reader_(nullptr)
,
// Thresholder is initialized to nullptr here, but will be set before use
// by: A constructor of a derived API, SetThresholder(), or created
// thresholder_ is initialized to nullptr here, but will be set before use
// by: A constructor of a derived API or created
// implicitly when used in InternalSetImage.
thresholder_(nullptr)
, paragraph_models_(nullptr)
@ -639,19 +639,6 @@ void TessBaseAPI::SetRectangle(int left, int top, int width, int height) {
ClearResults();
}
/**
* In extreme cases only, usually with a subclass of Thresholder, it
* is possible to provide a different Thresholder. The Thresholder may
* be preloaded with an image, settings etc, or they may be set after.
* Note that Tesseract takes ownership of the Thresholder and will
* delete it when it it is replaced or the API is destructed.
*/
void TessBaseAPI::SetThresholder(ImageThresholder *thresholder) {
delete thresholder_;
thresholder_ = thresholder;
ClearResults();
}
/**
* ONLY available after SetImage if you have Leptonica installed.
* Get a copy of the internal thresholded image from Tesseract.