Merge pull request #3439 from amitdo/remove-var

Remove unused variable
This commit is contained in:
Egor Pugin 2021-05-21 23:07:26 +03:00 committed by GitHub
commit 7a308edcb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -2111,9 +2111,8 @@ bool TessBaseAPI::Threshold(Pix **pix) {
auto thresholding_method = static_cast<ThresholdMethod>(static_cast<int>(tesseract_->thresholding_method));
if (thresholding_method == ThresholdMethod::Otsu) {
auto pageseg_mode = static_cast<PageSegMode>(static_cast<int>(tesseract_->tessedit_pageseg_mode));
Image pix_binary(*pix);
if (!thresholder_->ThresholdToPix(pageseg_mode, &pix_binary)) {
if (!thresholder_->ThresholdToPix(&pix_binary)) {
return false;
}
*pix = pix_binary;

View File

@ -219,7 +219,7 @@ std::tuple<bool, Image, Image, Image> ImageThresholder::Threshold(
// Creates a Pix and sets pix to point to the resulting pointer.
// Caller must use pixDestroy to free the created Pix.
/// Returns false on error.
bool ImageThresholder::ThresholdToPix(PageSegMode pageseg_mode, Image *pix) {
bool ImageThresholder::ThresholdToPix(Image *pix) {
if (image_width_ > INT16_MAX || image_height_ > INT16_MAX) {
tprintf("Image too large: (%d, %d)\n", image_width_, image_height_);
return false;

View File

@ -119,7 +119,7 @@ public:
/// Creates a Pix and sets pix to point to the resulting pointer.
/// Caller must use pixDestroy to free the created Pix.
/// Returns false on error.
virtual bool ThresholdToPix(PageSegMode pageseg_mode, Image *pix);
virtual bool ThresholdToPix(Image *pix);
virtual std::tuple<bool, Image, Image, Image> Threshold(
ThresholdMethod method);