Skip to content

Commit 7a308ed

Browse files
authored
Merge pull request #3439 from amitdo/remove-var
Remove unused variable
2 parents a72408f + bf979c8 commit 7a308ed

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/api/baseapi.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,9 +2111,8 @@ bool TessBaseAPI::Threshold(Pix **pix) {
21112111
auto thresholding_method = static_cast<ThresholdMethod>(static_cast<int>(tesseract_->thresholding_method));
21122112

21132113
if (thresholding_method == ThresholdMethod::Otsu) {
2114-
auto pageseg_mode = static_cast<PageSegMode>(static_cast<int>(tesseract_->tessedit_pageseg_mode));
21152114
Image pix_binary(*pix);
2116-
if (!thresholder_->ThresholdToPix(pageseg_mode, &pix_binary)) {
2115+
if (!thresholder_->ThresholdToPix(&pix_binary)) {
21172116
return false;
21182117
}
21192118
*pix = pix_binary;

src/ccmain/thresholder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ std::tuple<bool, Image, Image, Image> ImageThresholder::Threshold(
219219
// Creates a Pix and sets pix to point to the resulting pointer.
220220
// Caller must use pixDestroy to free the created Pix.
221221
/// Returns false on error.
222-
bool ImageThresholder::ThresholdToPix(PageSegMode pageseg_mode, Image *pix) {
222+
bool ImageThresholder::ThresholdToPix(Image *pix) {
223223
if (image_width_ > INT16_MAX || image_height_ > INT16_MAX) {
224224
tprintf("Image too large: (%d, %d)\n", image_width_, image_height_);
225225
return false;

src/ccmain/thresholder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class TESS_API ImageThresholder {
119119
/// Creates a Pix and sets pix to point to the resulting pointer.
120120
/// Caller must use pixDestroy to free the created Pix.
121121
/// Returns false on error.
122-
virtual bool ThresholdToPix(PageSegMode pageseg_mode, Image *pix);
122+
virtual bool ThresholdToPix(Image *pix);
123123

124124
virtual std::tuple<bool, Image, Image, Image> Threshold(
125125
ThresholdMethod method);

0 commit comments

Comments
 (0)