Remove TessTruthCallback from public API

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2020-12-30 15:37:53 +01:00
parent b7df4bc1dd
commit 588ac3fed2
5 changed files with 0 additions and 29 deletions

View File

@ -2,7 +2,6 @@
// File: apitypes.h
// Description: Types used in both the API and internally
// Author: Ray Smith
// Created: Wed Mar 03 09:22:53 PST 2010
//
// (C) Copyright 2010, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -90,8 +90,6 @@ using ParamsModelClassifyFunc = float (Dict::*)(const char*, void*);
using FillLatticeFunc = void (Wordrec::*)(const MATRIX&,
const WERD_CHOICE_LIST&,
const UNICHARSET&, BlamerBundle*);
using TruthCallback =
std::function<void(const UNICHARSET&, int, PageIterator*, Pix*)>;
/**
* Base class for all tesseract APIs.
@ -761,10 +759,6 @@ class TESS_API TessBaseAPI {
return last_oem_requested_;
}
void InitTruthCallback(TruthCallback cb) {
truth_cb_ = cb;
}
void set_min_orientation_margin(double margin);
/* @} */
@ -825,7 +819,6 @@ class TESS_API TessBaseAPI {
std::string language_; ///< Last initialized language.
OcrEngineMode last_oem_requested_; ///< Last ocr language mode requested.
bool recognition_done_; ///< page_res_ contains recognition data.
TruthCallback truth_cb_; ///< fxn for setting truth_* in WERD_RES
/**
* @defgroup ThresholderParams Thresholder Parameters

View File

@ -61,7 +61,6 @@ typedef tesseract::ProbabilityInContextFunc TessProbabilityInContextFunc;
// typedef tesseract::ParamsModelClassifyFunc TessParamsModelClassifyFunc;
typedef tesseract::FillLatticeFunc TessFillLatticeFunc;
typedef tesseract::Dawg TessDawg;
typedef tesseract::TruthCallback TessTruthCallback;
typedef tesseract::Orientation TessOrientation;
typedef tesseract::ParagraphJustification TessParagraphJustification;
typedef tesseract::WritingDirection TessWritingDirection;
@ -407,9 +406,6 @@ TESS_API int TessBaseAPINumDawgs(const TessBaseAPI* handle);
TESS_API TessOcrEngineMode TessBaseAPIOem(const TessBaseAPI* handle);
TESS_API void TessBaseAPIInitTruthCallback(TessBaseAPI* handle,
TessTruthCallback cb);
TESS_API void TessBaseGetBlockTextOrientations(TessBaseAPI* handle,
int** block_orientation,
bool** vertical_writing);

View File

@ -199,7 +199,6 @@ TessBaseAPI::TessBaseAPI()
page_res_(nullptr),
last_oem_requested_(OEM_DEFAULT),
recognition_done_(false),
truth_cb_(nullptr),
rect_left_(0),
rect_top_(0),
rect_width_(0),
@ -857,17 +856,6 @@ int TessBaseAPI::Recognize(ETEXT_DESC* monitor) {
}
#endif // ndef DISABLED_LEGACY_ENGINE
if (truth_cb_ != nullptr) {
tesseract_->wordrec_run_blamer.set_value(true);
auto *page_it = new PageIterator(
page_res_, tesseract_, thresholder_->GetScaleFactor(),
thresholder_->GetScaledYResolution(),
rect_left_, rect_top_, rect_width_, rect_height_);
truth_cb_(tesseract_->getDict().getUnicharset(),
image_height_, page_it, this->tesseract()->pix_grey());
delete page_it;
}
int result = 0;
if (tesseract_->interactive_display_mode) {
#ifndef GRAPHICS_DISABLED

View File

@ -613,11 +613,6 @@ TessOcrEngineMode TessBaseAPIOem(const TessBaseAPI* handle) {
return handle->oem();
}
void TessBaseAPIInitTruthCallback(TessBaseAPI* handle,
TessTruthCallback cb) {
handle->InitTruthCallback(cb);
}
void TessBaseAPISetMinOrientationMargin(TessBaseAPI* handle,
double margin) {
handle->set_min_orientation_margin(margin);