mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-04 18:29:06 +08:00
Merge pull request #1765 from stweil/includes
Add missing include statements and clean some include statements
This commit is contained in:
commit
cfa787d976
@ -22,8 +22,9 @@
|
||||
#include "config_auto.h"
|
||||
#endif
|
||||
|
||||
#include "baseapi.h"
|
||||
#ifdef __linux__
|
||||
#include <signal.h>
|
||||
#include <signal.h> // for sigaction, SA_RESETHAND, SIGBUS, SIGFPE
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
@ -34,49 +35,58 @@
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#else
|
||||
#include <dirent.h>
|
||||
#include <dirent.h> // for closedir, opendir, readdir, DIR, dirent
|
||||
#include <libgen.h>
|
||||
#include <cstring>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/stat.h> // for stat, S_IFDIR
|
||||
#include <unistd.h>
|
||||
#endif // _WIN32
|
||||
|
||||
#include <algorithm>
|
||||
#include <clocale>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <memory> // std::unique_ptr
|
||||
#include <string>
|
||||
|
||||
#include "allheaders.h"
|
||||
|
||||
#include "baseapi.h"
|
||||
#include "blobclass.h"
|
||||
#include "resultiterator.h"
|
||||
#include "mutableiterator.h"
|
||||
#include "thresholder.h"
|
||||
#include "tesseractclass.h"
|
||||
#include "pageres.h"
|
||||
#include "paragraphs.h"
|
||||
#include "tessvars.h"
|
||||
#include "control.h"
|
||||
#include "dict.h"
|
||||
#include "pgedit.h"
|
||||
#include "paramsd.h"
|
||||
#include "output.h"
|
||||
#include "globaloc.h"
|
||||
#include "globals.h"
|
||||
#include "edgblob.h"
|
||||
#include "equationdetect.h"
|
||||
#include "makerow.h"
|
||||
#include "otsuthr.h"
|
||||
#include "osdetect.h"
|
||||
#include "params.h"
|
||||
#include "renderer.h"
|
||||
#include "strngs.h"
|
||||
#include "openclwrapper.h"
|
||||
#include <clocale> // for LC_ALL, LC_CTYPE, LC_NUMERIC
|
||||
#include <cmath> // for round, M_PI
|
||||
#include <cstdint> // for int32_t
|
||||
#include <cstring> // for strcmp, strcpy
|
||||
#include <fstream> // for size_t
|
||||
#include <iostream> // for std::cin
|
||||
#include <memory> // for std::unique_ptr
|
||||
#include "allheaders.h" // for pixDestroy, boxCreate, boxaAddBox, box...
|
||||
#include "blobclass.h" // for ExtractFontName
|
||||
#include "boxword.h" // for BoxWord
|
||||
#include "config_auto.h" // for PACKAGE_VERSION
|
||||
#include "coutln.h" // for C_OUTLINE_IT, C_OUTLINE_LIST
|
||||
#include "dawg_cache.h" // for DawgCache
|
||||
#include "dict.h" // for Dict
|
||||
#include "edgblob.h" // for extract_edges
|
||||
#include "elst.h" // for ELIST_ITERATOR, ELISTIZE, ELISTIZEH
|
||||
#include "environ.h" // for l_uint8, FALSE, TRUE
|
||||
#include "equationdetect.h" // for EquationDetect
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "globaloc.h" // for SavePixForCrash, signal_exit
|
||||
#include "helpers.h" // for IntCastRounded, chomp_string
|
||||
#include "host.h" // for BOOL8
|
||||
#include "imageio.h" // for IFF_TIFF_G4, IFF_TIFF, IFF_TIFF_G3
|
||||
#include "intfx.h" // for INT_FX_RESULT_STRUCT
|
||||
#include "mutableiterator.h" // for MutableIterator
|
||||
#include "normalis.h" // for kBlnBaselineOffset, kBlnXHeight
|
||||
#include "ocrclass.h" // for ETEXT_DESC
|
||||
#include "openclwrapper.h" // for PERF_COUNT_END, PERF_COUNT_START, PERF...
|
||||
#include "osdetect.h" // for OSResults, OSBestResult, OrientationId...
|
||||
#include "pageres.h" // for PAGE_RES_IT, WERD_RES, PAGE_RES, CR_DE...
|
||||
#include "paragraphs.h" // for DetectParagraphs
|
||||
#include "params.h" // for BoolParam, IntParam, DoubleParam, Stri...
|
||||
#include "pdblock.h" // for PDBLK
|
||||
#include "points.h" // for FCOORD
|
||||
#include "polyblk.h" // for POLY_BLOCK
|
||||
#include "rect.h" // for TBOX
|
||||
#include "renderer.h" // for TessResultRenderer
|
||||
#include "resultiterator.h" // for ResultIterator
|
||||
#include "stepblob.h" // for C_BLOB_IT, C_BLOB, C_BLOB_LIST
|
||||
#include "strngs.h" // for STRING
|
||||
#include "tessdatamanager.h" // for TessdataManager, kTrainedDataSuffix
|
||||
#include "tesseractclass.h" // for Tesseract
|
||||
#include "thresholder.h" // for ImageThresholder
|
||||
#include "tprintf.h" // for tprintf
|
||||
#include "werd.h" // for WERD, WERD_IT, W_FUZZY_NON, W_FUZZY_SP
|
||||
|
||||
BOOL_VAR(stream_filelist, FALSE, "Stream a filelist from stdin");
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
// and hide includes of complex types in baseapi.cpp.
|
||||
#include "genericvector.h"
|
||||
#include "platform.h"
|
||||
#include "publictypes.h"
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -23,14 +23,14 @@
|
||||
#include "config_auto.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
#include <cstdint> // for int16_t, int32_t
|
||||
#include <cstdio> // for fclose, fopen, FILE
|
||||
#include <ctime> // for clock
|
||||
#ifdef __UNIX__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <cctype>
|
||||
#include "callcpp.h"
|
||||
#include "control.h"
|
||||
#ifndef DISABLED_LEGACY_ENGINE
|
||||
@ -42,6 +42,7 @@
|
||||
#include "lstmrecognizer.h"
|
||||
#include "ocrclass.h"
|
||||
#include "output.h"
|
||||
#include "pageres.h" // for WERD_RES, PAGE_RES_IT, PAGE_RES, BLO...
|
||||
#include "pgedit.h"
|
||||
#include "reject.h"
|
||||
#include "sorthelper.h"
|
||||
|
@ -19,15 +19,30 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include "reject.h"
|
||||
#include "statistc.h"
|
||||
#include "control.h"
|
||||
#include "fixspace.h"
|
||||
#include "genblob.h"
|
||||
#include "tessvars.h"
|
||||
#include "globals.h"
|
||||
#include "tesseractclass.h"
|
||||
#include <cstdint> // for INT16_MAX, int16_t, int32_t
|
||||
#include "blobs.h" // for TWERD, TBLOB, TESSLINE
|
||||
#include "boxword.h" // for BoxWord
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "genblob.h" // for c_blob_comparator
|
||||
#include "host.h" // for FALSE, TRUE
|
||||
#include "normalis.h" // for kBlnXHeight, kBlnBaselineOffset
|
||||
#include "ocrclass.h" // for ETEXT_DESC
|
||||
#include "pageres.h" // for WERD_RES_IT, WERD_RES, WERD_RES_LIST
|
||||
#include "params.h" // for IntParam, StringParam, BoolParam, Doub...
|
||||
#include "ratngs.h" // for WERD_CHOICE, FREQ_DAWG_PERM, NUMBER_PERM
|
||||
#include "rect.h" // for TBOX
|
||||
#include "stepblob.h" // for C_BLOB_IT, C_BLOB_LIST, C_BLOB
|
||||
#include "strngs.h" // for STRING
|
||||
#include "tesseractclass.h" // for Tesseract, TesseractStats, WordData
|
||||
#include "tessvars.h" // for debug_fp
|
||||
#include "tprintf.h" // for tprintf
|
||||
#include "unichar.h" // for UNICHAR_ID
|
||||
#include "unicharset.h" // for UNICHARSET
|
||||
#include "werd.h" // for WERD, W_EOL, W_FUZZY_NON, W_FUZZY_SP
|
||||
|
||||
class BLOCK;
|
||||
class ROW;
|
||||
|
||||
#define PERFECT_WERDS 999
|
||||
#define MAXSPACING 128 /*max expected spacing in pix */
|
||||
|
@ -26,22 +26,28 @@
|
||||
#ifndef TESSERACT_CCMAIN_TESSERACTCLASS_H_
|
||||
#define TESSERACT_CCMAIN_TESSERACTCLASS_H_
|
||||
|
||||
#include "allheaders.h"
|
||||
#include "control.h"
|
||||
#include "debugpixa.h"
|
||||
#include "devanagari_processing.h"
|
||||
#include "docqual.h"
|
||||
#include "genericvector.h"
|
||||
#include "ocrclass.h"
|
||||
#include "params.h"
|
||||
#include "textord.h"
|
||||
#include "wordrec.h"
|
||||
#ifdef DISABLED_LEGACY_ENGINE
|
||||
#include "pageres.h"
|
||||
#endif
|
||||
#include <cstdint> // for int16_t, int32_t, uint16_t
|
||||
#include <cstdio> // for FILE
|
||||
#include "allheaders.h" // for pixDestroy, pixGetWidth, pixGetHe...
|
||||
#include "control.h" // for ACCEPTABLE_WERD_TYPE
|
||||
#include "debugpixa.h" // for DebugPixa
|
||||
#include "devanagari_processing.h" // for ShiroRekhaSplitter
|
||||
#include "docqual.h" // for GARBAGE_LEVEL
|
||||
#include "genericvector.h" // for GenericVector, PointerVector
|
||||
#include "host.h" // for BOOL8
|
||||
#include "pageres.h" // for WERD_RES (ptr only), PAGE_RES (pt...
|
||||
#include "params.h" // for BOOL_VAR_H, BoolParam, DoubleParam
|
||||
#include "points.h" // for FCOORD
|
||||
#include "publictypes.h" // for OcrEngineMode, PageSegMode, OEM_L...
|
||||
#include "ratngs.h" // for ScriptPos, WERD_CHOICE (ptr only)
|
||||
#include "strngs.h" // for STRING
|
||||
#include "tessdatamanager.h" // for TessdataManager
|
||||
#include "textord.h" // for Textord
|
||||
#include "unichar.h" // for UNICHAR_ID
|
||||
#include "wordrec.h" // for Wordrec
|
||||
|
||||
class BLOB_CHOICE_LIST_CLIST;
|
||||
class BLOCK_LIST;
|
||||
class ETEXT_DESC;
|
||||
struct OSResults;
|
||||
class PAGE_RES;
|
||||
class PAGE_RES_IT;
|
||||
@ -169,7 +175,7 @@ class Tesseract : public Wordrec {
|
||||
Tesseract();
|
||||
~Tesseract();
|
||||
|
||||
// Return appropriate dictionary
|
||||
// Return appropriate dictionary
|
||||
Dict& getDict() override;
|
||||
|
||||
// Clear as much used memory as possible without resetting the adaptive
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include <cstring> // for memcpy
|
||||
#include "boxword.h" // for BoxWord
|
||||
#include "genericvector.h" // for GenericVector
|
||||
#include "matrix.h" // for MATRIX_COORD, MATRIX (ptr only)
|
||||
#include "params_training_featdef.h" // for ParamsTrainingBundle, ParamsTra...
|
||||
#include "ratngs.h" // for BLOB_CHOICE_LIST (ptr only)
|
||||
#include "rect.h" // for TBOX
|
||||
@ -34,9 +33,11 @@
|
||||
#include "unichar.h" // for UNICHAR_ID
|
||||
|
||||
class DENORM;
|
||||
class MATRIX;
|
||||
class UNICHARSET;
|
||||
class WERD_RES;
|
||||
|
||||
struct MATRIX_COORD;
|
||||
struct TWERD;
|
||||
|
||||
template <class R, class A1, class A2> class TessResultCallback2;
|
||||
|
@ -18,13 +18,15 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "boxread.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "fileerr.h"
|
||||
#include "rect.h"
|
||||
#include "strngs.h"
|
||||
#include "tprintf.h"
|
||||
#include "unichar.h"
|
||||
#include <cstring> // for strchr, strcmp, strrchr
|
||||
#include "errcode.h" // for ERRCODE, TESSEXIT
|
||||
#include "fileerr.h" // for CANTOPENFILE
|
||||
#include "genericvector.h" // for GenericVector
|
||||
#include "helpers.h" // for chomp_string
|
||||
#include "rect.h" // for TBOX
|
||||
#include "strngs.h" // for STRING
|
||||
#include "tprintf.h" // for tprintf
|
||||
#include "unichar.h" // for UNICHAR
|
||||
|
||||
// Special char code used to identify multi-blob labels.
|
||||
static const char* kMultiBlobLabelCode = "WordStr";
|
||||
|
@ -17,12 +17,13 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef POINTS_H
|
||||
#define POINTS_H
|
||||
#ifndef POINTS_H
|
||||
#define POINTS_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "elst.h"
|
||||
#include <cmath> // for sqrt, atan2
|
||||
#include <cstdio>
|
||||
#include "elst.h"
|
||||
#include "platform.h" // for DLLSYM
|
||||
|
||||
class FCOORD;
|
||||
|
||||
|
@ -20,8 +20,9 @@
|
||||
#ifndef POLYAPRX_H
|
||||
#define POLYAPRX_H
|
||||
|
||||
#include "blobs.h"
|
||||
#include "coutln.h"
|
||||
class C_OUTLINE;
|
||||
struct EDGEPT;
|
||||
struct TESSLINE;
|
||||
|
||||
// convert a chain-coded input to the old OUTLINE approximation
|
||||
TESSLINE* ApproximateOutline(bool allow_detailed_fx, C_OUTLINE *c_outline);
|
||||
|
@ -1,8 +1,7 @@
|
||||
/**********************************************************************
|
||||
* File: quspline.cpp (Formerly qspline.c)
|
||||
* Description: Code for the QSPLINE class.
|
||||
* Author: Ray Smith
|
||||
* Created: Tue Oct 08 17:16:12 BST 1991
|
||||
* Author: Ray Smith
|
||||
*
|
||||
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -17,9 +16,12 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include "allheaders.h"
|
||||
#include "quadlsq.h"
|
||||
#include "quspline.h"
|
||||
#include "allheaders.h" // for pixRenderPolyline, pixGetDepth, pixGetHeight
|
||||
#include "pix.h" // for L_CLEAR_PIXELS, L_SET_PIXELS, Pix (ptr only)
|
||||
#include "points.h" // for ICOORD
|
||||
#include "quadlsq.h" // for QLSQ
|
||||
#include "quadratc.h" // for QUAD_COEFFS
|
||||
|
||||
// Include automatically generated configuration file if running autoconf.
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -20,11 +20,13 @@
|
||||
#ifndef QUSPLINE_H
|
||||
#define QUSPLINE_H
|
||||
|
||||
#include "quadratc.h"
|
||||
#include "serialis.h"
|
||||
#include "rect.h"
|
||||
#include <cstdint> // for int32_t
|
||||
#include "scrollview.h" // for ScrollView, ScrollView::Color
|
||||
|
||||
class ICOORD;
|
||||
class QUAD_COEFFS;
|
||||
class ROW;
|
||||
class TBOX;
|
||||
struct Pix;
|
||||
|
||||
class QSPLINE
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**********************************************************************
|
||||
* File: rect.h (Formerly box.h)
|
||||
* Description: Bounding box class definition.
|
||||
* Author: Phil Cheatle
|
||||
* Created: Wed Oct 16 15:18:45 BST 1991
|
||||
* Author: Phil Cheatle
|
||||
* Created: Wed Oct 16 15:18:45 BST 1991
|
||||
*
|
||||
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -17,14 +17,20 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef RECT_H
|
||||
#define RECT_H
|
||||
#ifndef RECT_H
|
||||
#define RECT_H
|
||||
|
||||
#include <cmath>
|
||||
#include "points.h"
|
||||
#include "scrollview.h"
|
||||
#include "strngs.h"
|
||||
#include "tprintf.h"
|
||||
#include <algorithm> // for std::max, std::min
|
||||
#include <cmath> // for ceil, floor
|
||||
#include <cstdint> // for INT16_MAX
|
||||
#include <cstdio> // for FILE
|
||||
#include "ipoints.h" // for operator+=, operator-=, ICOORD::rotate
|
||||
#include "platform.h" // for DLLSYM
|
||||
#include "points.h" // for ICOORD, FCOORD
|
||||
#include "scrollview.h" // for ScrollView, ScrollView::Color
|
||||
#include "tprintf.h" // for tprintf
|
||||
|
||||
class STRING;
|
||||
|
||||
class DLLSYM TBOX { // bounding box
|
||||
public:
|
||||
|
@ -1,14 +1,10 @@
|
||||
/* -*-C-*-
|
||||
********************************************************************************
|
||||
*
|
||||
* File: split.h (Formerly split.h)
|
||||
* File: split.h
|
||||
* Description:
|
||||
* Author: Mark Seaman, SW Productivity
|
||||
* Created: Fri Oct 16 14:37:00 1987
|
||||
* Modified: Mon May 13 10:49:23 1991 (Mark Seaman) marks@hpgrlt
|
||||
* Language: C
|
||||
* Package: N/A
|
||||
* Status: Reusable Software Component
|
||||
* Author: Mark Seaman, SW Productivity
|
||||
* Status: Reusable Software Component
|
||||
*
|
||||
* (c) Copyright 1987, Hewlett-Packard Company.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -28,8 +24,12 @@
|
||||
/*----------------------------------------------------------------------
|
||||
I n c l u d e s
|
||||
----------------------------------------------------------------------*/
|
||||
#include "blobs.h"
|
||||
#include "scrollview.h"
|
||||
|
||||
#include "blobs.h" // for EDGEPT, TBLOB, TESSLINE
|
||||
#include "params.h" // for BOOL_VAR_H, BoolParam
|
||||
#include "rect.h" // for TBOX
|
||||
|
||||
class ScrollView;
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
T y p e s
|
||||
|
@ -17,14 +17,19 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include "stepblob.h"
|
||||
#include "allheaders.h"
|
||||
|
||||
// Include automatically generated configuration file if running autoconf.
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config_auto.h"
|
||||
#endif
|
||||
|
||||
#include "stepblob.h"
|
||||
#include "allheaders.h" // for pixCreate, pixGetDepth
|
||||
#include "genericvector.h" // for GenericVector
|
||||
#include "host.h" // for TRUE, FALSE
|
||||
#include "ipoints.h" // for operator+=
|
||||
|
||||
class DENORM;
|
||||
|
||||
// Max perimeter to width ratio for a baseline position above box bottom.
|
||||
const double kMaxPerimeterWidthRatio = 8.0;
|
||||
|
||||
|
@ -20,11 +20,18 @@
|
||||
#ifndef STEPBLOB_H
|
||||
#define STEPBLOB_H
|
||||
|
||||
#include "coutln.h"
|
||||
#include "rect.h"
|
||||
#include <cstdint> // for int32_t, int16_t
|
||||
#include "coutln.h" // for C_OUTLINE_LIST, C_OUTLINE
|
||||
#include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK
|
||||
#include "points.h" // for FCOORD, ICOORD (ptr only)
|
||||
#include "rect.h" // for TBOX
|
||||
#include "scrollview.h" // for ScrollView, ScrollView::Color
|
||||
|
||||
class C_BLOB;
|
||||
class DENORM;
|
||||
|
||||
struct Pix;
|
||||
|
||||
ELISTIZEH(C_BLOB)
|
||||
|
||||
class C_BLOB:public ELIST_LINK
|
||||
|
@ -15,10 +15,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TESSERACT_LSTM_STATIC_SHAPE_H_
|
||||
#define TESSERACT_LSTM_STATIC_SHAPE_H_
|
||||
|
||||
#include "tprintf.h"
|
||||
#include "serialis.h" // for TFile
|
||||
#include "tprintf.h" // for tprintf
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stridemap.h"
|
||||
#include <cassert> // for assert
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -21,22 +21,39 @@
|
||||
#include "config_auto.h"
|
||||
#endif
|
||||
|
||||
#include <cfloat> // for FLT_MAX
|
||||
#include "globaloc.h"
|
||||
#include "blread.h"
|
||||
#include "blobbox.h"
|
||||
#include "ccstruct.h"
|
||||
#include "edgblob.h"
|
||||
#include "drawtord.h"
|
||||
#include "makerow.h"
|
||||
#include "wordseg.h"
|
||||
#include "textord.h"
|
||||
#include "tordmain.h"
|
||||
#include <cfloat> // for FLT_MAX
|
||||
#include <cmath> // for ceil, floor, M_PI
|
||||
#include <cstdint> // for INT16_MAX, uint32_t, int32_t, int16_t
|
||||
#include "allheaders.h" // for pixDestroy, pixGetHeight, boxCreate
|
||||
#include "arrayaccess.h" // for GET_DATA_BYTE
|
||||
#include "blobbox.h" // for BLOBNBOX_IT, BLOBNBOX, TO_BLOCK, TO_B...
|
||||
#include "ccstruct.h" // for CCStruct, CCStruct::kXHeightFraction
|
||||
#include "clst.h" // for CLISTIZE
|
||||
#include "coutln.h" // for C_OUTLINE_IT, C_OUTLINE_LIST, C_OUTLINE
|
||||
#include "drawtord.h" // for plot_box_list, to_win, create_to_win
|
||||
#include "edgblob.h" // for extract_edges
|
||||
#include "errcode.h" // for set_global_loc_code, ASSERT_HOST, LOC...
|
||||
#include "genericvector.h" // for PointerVector, GenericVector
|
||||
#include "makerow.h" // for textord_test_x, textord_test_y, texto...
|
||||
#include "morph.h" // for L_BOUNDARY_BG
|
||||
#include "ocrblock.h" // for BLOCK_IT, BLOCK, BLOCK_LIST (ptr only)
|
||||
#include "ocrrow.h" // for ROW, ROW_IT, ROW_LIST, tweak_row_base...
|
||||
#include "params.h" // for DoubleParam, BoolParam, IntParam
|
||||
#include "pdblock.h" // for PDBLK
|
||||
#include "points.h" // for FCOORD, ICOORD
|
||||
#include "polyblk.h" // for POLY_BLOCK
|
||||
#include "quadratc.h" // for QUAD_COEFFS
|
||||
#include "quspline.h" // for QSPLINE, tweak_row_baseline
|
||||
#include "rect.h" // for TBOX
|
||||
#include "scrollview.h" // for ScrollView, ScrollView::WHITE
|
||||
#include "statistc.h" // for STATS
|
||||
#include "stepblob.h" // for C_BLOB_IT, C_BLOB, C_BLOB_LIST
|
||||
#include "textord.h" // for Textord, WordWithBox, WordGrid, WordS...
|
||||
#include "tprintf.h" // for tprintf
|
||||
#include "werd.h" // for WERD_IT, WERD, WERD_LIST, W_DONT_CHOP
|
||||
|
||||
#include "allheaders.h"
|
||||
|
||||
#undef EXTERN
|
||||
#define EXTERN
|
||||
struct Box;
|
||||
|
||||
#define MAX_NEAREST_DIST 600 //for block skew stats
|
||||
|
||||
|
@ -27,22 +27,30 @@
|
||||
I n c l u d e s
|
||||
----------------------------------------------------------------------*/
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "chopper.h"
|
||||
#include "blamer.h" // for BlamerBundle, IRR_CORRECT
|
||||
#include "blobs.h" // for TPOINT, TBLOB, EDGEPT, TESSLINE, divisible_blob
|
||||
#include "callcpp.h" // for Red
|
||||
#include "dict.h" // for Dict
|
||||
#include "host.h" // for FALSE, TRUE
|
||||
#include "lm_pain_points.h" // for LMPainPoints
|
||||
#include "lm_state.h" // for BestChoiceBundle
|
||||
#include "matrix.h" // for MATRIX
|
||||
#include "normalis.h" // for DENORM
|
||||
#include "pageres.h" // for WERD_RES
|
||||
#include "params.h" // for IntParam, BoolParam
|
||||
#include "ratngs.h" // for BLOB_CHOICE (ptr only), BLOB_CHOICE_LIST (ptr ...
|
||||
#include "rect.h" // for TBOX
|
||||
#include "render.h" // for display_blob
|
||||
#include "seam.h" // for SEAM
|
||||
#include "split.h" // for remove_edgept
|
||||
#include "stopper.h" // for DANGERR
|
||||
#include "tprintf.h" // for tprintf
|
||||
#include "wordrec.h" // for Wordrec, SegSearchPending (ptr only)
|
||||
|
||||
#include "associate.h"
|
||||
#include "blobs.h"
|
||||
#include "callcpp.h"
|
||||
#include "findseam.h"
|
||||
#include "globals.h"
|
||||
#include "render.h"
|
||||
#include "pageres.h"
|
||||
#include "seam.h"
|
||||
#include "stopper.h"
|
||||
#include "structures.h"
|
||||
#include "unicharset.h"
|
||||
#include "wordrec.h"
|
||||
class CHAR_FRAGMENT;
|
||||
|
||||
template <typename T> class GenericVector;
|
||||
|
||||
// Include automatically generated configuration file if running autoconf.
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -18,21 +18,31 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "language_model.h"
|
||||
#include <cassert> // for assert
|
||||
#include <cmath> // for log2, pow
|
||||
#include "blamer.h" // for BlamerBundle
|
||||
#include "ccutil.h" // for CCUtil
|
||||
#include "dawg.h" // for NO_EDGE, Dawg, Dawg::kPatternUn...
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "lm_state.h" // for ViterbiStateEntry, ViterbiState...
|
||||
#include "matrix.h" // for MATRIX_COORD
|
||||
#include "pageres.h" // for WERD_RES
|
||||
#include "params.h" // for IntParam, BoolParam, DoubleParam
|
||||
#include "params_training_featdef.h" // for ParamsTrainingHypothesis, PTRAI...
|
||||
#include "tprintf.h" // for tprintf
|
||||
#include "unichar.h" // for UNICHAR_ID, INVALID_UNICHAR_ID
|
||||
#include "unicharset.h" // for UNICHARSET
|
||||
#include "unicity_table.h" // for UnicityTable
|
||||
|
||||
#include "dawg.h"
|
||||
#include "intproto.h"
|
||||
#include "helpers.h"
|
||||
#include "lm_state.h"
|
||||
#include "lm_pain_points.h"
|
||||
#include "matrix.h"
|
||||
#include "params.h"
|
||||
#include "params_training_featdef.h"
|
||||
template <typename T> class GenericVector;
|
||||
template <typename T> class UnicityTable;
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
class LMPainPoints;
|
||||
struct FontInfo;
|
||||
|
||||
#if (defined(_MSC_VER) && _MSC_VER < 1900) || defined(ANDROID)
|
||||
static inline double log2(double n) {
|
||||
return log(n) / log(2.0);
|
||||
|
@ -22,21 +22,30 @@
|
||||
#ifndef TESSERACT_WORDREC_LANGUAGE_MODEL_H_
|
||||
#define TESSERACT_WORDREC_LANGUAGE_MODEL_H_
|
||||
|
||||
#include "associate.h"
|
||||
#include "dawg.h"
|
||||
#include "dict.h"
|
||||
#include "fontinfo.h"
|
||||
#include "intproto.h"
|
||||
#include "lm_consistency.h"
|
||||
#include "lm_pain_points.h"
|
||||
#include "lm_state.h"
|
||||
#include "matrix.h"
|
||||
#include "params.h"
|
||||
#include "pageres.h"
|
||||
#include "params_model.h"
|
||||
#include <cmath> // for exp
|
||||
#include "associate.h" // for AssociateStats (ptr only), AssociateUtils
|
||||
#include "dawg.h" // for DawgPositionVector
|
||||
#include "dict.h" // for DawgArgs, Dict
|
||||
#include "lm_consistency.h" // for LMConsistencyInfo
|
||||
#include "lm_state.h" // for ViterbiStateEntry, LanguageModelFlagsType
|
||||
#include "params.h" // for DoubleParam, double_VAR_H, IntParam, Boo...
|
||||
#include "params_model.h" // for ParamsModel
|
||||
#include "ratngs.h" // for BLOB_CHOICE (ptr only), BLOB_CHOICE_LIST...
|
||||
#include "stopper.h" // for DANGERR
|
||||
#include "strngs.h" // for STRING
|
||||
|
||||
class UNICHARSET;
|
||||
class WERD_RES;
|
||||
|
||||
struct BlamerBundle;
|
||||
|
||||
template <typename T> class UnicityTable;
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
class LMPainPoints;
|
||||
struct FontInfo;
|
||||
|
||||
// This class that contains the data structures and functions necessary
|
||||
// to represent and use the knowledge about the language.
|
||||
class LanguageModel {
|
||||
|
@ -21,10 +21,11 @@
|
||||
#ifndef TESSERACT_WORDREC_LM_CONSISTENCY_H_
|
||||
#define TESSERACT_WORDREC_LM_CONSISTENCY_H_
|
||||
|
||||
#include "dawg.h"
|
||||
#include "dict.h"
|
||||
#include "host.h"
|
||||
#include "ratngs.h"
|
||||
#include <cstdint> // for INT16_MAX
|
||||
#include "dawg.h" // for EDGE_REF, NO_EDGE
|
||||
#include "dict.h" // for XH_GOOD, XH_INCONSISTENT, XHeightConsi...
|
||||
|
||||
class BLOB_CHOICE;
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -23,13 +23,17 @@
|
||||
#ifndef TESSERACT_WORDREC_PAIN_POINTS_H_
|
||||
#define TESSERACT_WORDREC_PAIN_POINTS_H_
|
||||
|
||||
#include "associate.h"
|
||||
#include "dict.h"
|
||||
#include "genericheap.h"
|
||||
#include "lm_state.h"
|
||||
#include "genericheap.h" // for GenericHeap
|
||||
#include "matrix.h" // for MATRIX_COORD (ptr only), MatrixCoordPair
|
||||
#include "stopper.h" // for DANGERR
|
||||
|
||||
class WERD_RES;
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
class Dict;
|
||||
struct ViterbiStateEntry;
|
||||
|
||||
// Heap of pain points used for determining where to chop/join.
|
||||
using PainPointHeap = GenericHeap<MatrixCoordPair>;
|
||||
|
||||
|
@ -22,14 +22,16 @@
|
||||
#ifndef TESSERACT_WORDREC_LANGUAGE_MODEL_DEFS_H_
|
||||
#define TESSERACT_WORDREC_LANGUAGE_MODEL_DEFS_H_
|
||||
|
||||
#include "associate.h"
|
||||
#include "elst.h"
|
||||
#include "dawg.h"
|
||||
#include "lm_consistency.h"
|
||||
#include "matrix.h"
|
||||
#include "ratngs.h"
|
||||
#include "stopper.h"
|
||||
#include "strngs.h"
|
||||
#include "associate.h" // for AssociateStats
|
||||
#include "dawg.h" // for DawgPositionVector
|
||||
#include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK
|
||||
#include "genericvector.h" // for PointerVector
|
||||
#include "lm_consistency.h" // for LMConsistencyInfo
|
||||
#include "ratngs.h" // for BLOB_CHOICE, PermuterType
|
||||
#include "stopper.h" // for DANGERR
|
||||
#include "strngs.h" // for STRING
|
||||
#include "unichar.h" // for UNICHAR_ID
|
||||
#include "unicharset.h" // for UNICHARSET
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* -*-C-*-
|
||||
********************************************************************************
|
||||
*
|
||||
* File: outlines.h (Formerly outlines.h)
|
||||
* File: outlines.h
|
||||
* Description: Combinatorial Splitter
|
||||
* Author: Mark Seaman, OCR Technology
|
||||
* Created: Thu Jul 27 11:27:55 1989
|
||||
@ -22,13 +22,14 @@
|
||||
** limitations under the License.
|
||||
*
|
||||
*********************************************************************************/
|
||||
|
||||
#ifndef OUTLINES_H
|
||||
#define OUTLINES_H
|
||||
|
||||
#include "blobs.h"
|
||||
#include "chop.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cmath> // for abs
|
||||
#include "blobs.h" // for TPOINT
|
||||
#include "params.h" // for IntParam
|
||||
#include "wordrec.h" // for Wordrec
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
C o n s t a n t s
|
||||
|
@ -20,12 +20,14 @@
|
||||
#ifndef TESSERACT_WORDREC_PARAMS_MODEL_H_
|
||||
#define TESSERACT_WORDREC_PARAMS_MODEL_H_
|
||||
|
||||
#include "params_training_featdef.h"
|
||||
#include "ratngs.h"
|
||||
#include "strngs.h"
|
||||
#include "genericvector.h" // for GenericVector
|
||||
#include "params_training_featdef.h" // for PTRAIN_NUM_FEATURE_TYPES
|
||||
#include "strngs.h" // for STRING
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
class TFile;
|
||||
|
||||
// Represents the learned weights for a given language.
|
||||
class ParamsModel {
|
||||
public:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* -*-C-*-
|
||||
********************************************************************************
|
||||
*
|
||||
* File: plotedges.h (Formerly plotedges.h)
|
||||
* File: plotedges.h
|
||||
* Description: Convert the various data type into line lists
|
||||
* Author: Mark Seaman, OCR Technology
|
||||
* Created: Fri Jul 28 13:14:48 1989
|
||||
@ -22,12 +22,16 @@
|
||||
** limitations under the License.
|
||||
*
|
||||
*********************************************************************************/
|
||||
|
||||
#ifndef PLOTEDGES_H
|
||||
#define PLOTEDGES_H
|
||||
|
||||
#include "callcpp.h"
|
||||
#include "oldlist.h"
|
||||
#include "blobs.h"
|
||||
#include "oldlist.h" // for LIST
|
||||
|
||||
class ScrollView;
|
||||
|
||||
struct EDGEPT;
|
||||
struct TBLOB;
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
V a r i a b l e s
|
||||
|
@ -25,9 +25,14 @@
|
||||
#ifndef RENDER_H
|
||||
#define RENDER_H
|
||||
|
||||
#include "host.h"
|
||||
#include "callcpp.h"
|
||||
#include "blobs.h"
|
||||
#include "callcpp.h" // for C_COL
|
||||
#include "params.h" // for BOOL_VAR_H, BoolParam
|
||||
|
||||
class ScrollView;
|
||||
|
||||
struct EDGEPT;
|
||||
struct TBLOB;
|
||||
struct TESSLINE;
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
V a r i a b l e s
|
||||
|
@ -17,16 +17,20 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "wordrec.h"
|
||||
|
||||
#include "associate.h"
|
||||
#include "language_model.h"
|
||||
#include "matrix.h"
|
||||
#include "params.h"
|
||||
#include "lm_pain_points.h"
|
||||
#include "ratngs.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdint.h> // for INT32_MAX
|
||||
#include "blamer.h" // for BlamerBundle
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "genericvector.h" // for GenericVector
|
||||
#include "lm_pain_points.h" // for LMPainPoints, LM_PPTYPE_SHAPE, LMPainPoi...
|
||||
#include "lm_state.h" // for BestChoiceBundle, ViterbiStateEntry
|
||||
#include "matrix.h" // for MATRIX_COORD, MATRIX
|
||||
#include "pageres.h" // for WERD_RES
|
||||
#include "params.h" // for BoolParam, IntParam, DoubleParam
|
||||
#include "ratngs.h" // for BLOB_CHOICE_LIST, BLOB_CHOICE_IT
|
||||
#include "strngs.h" // for STRING
|
||||
#include "tesscallback.h" // for TessResultCallback2
|
||||
#include "tprintf.h" // for tprintf
|
||||
#include "wordrec.h" // for Wordrec, SegSearchPending (ptr only)
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -4,11 +4,6 @@
|
||||
* File: wordclass.cpp (Formerly wordclass.c)
|
||||
* Description: Word classifier
|
||||
* Author: Mark Seaman, OCR Technology
|
||||
* Created: Tue Jan 30 14:03:25 1990
|
||||
* Modified: Fri Jul 12 16:03:06 1991 (Mark Seaman) marks@hpgrlt
|
||||
* Language: C
|
||||
* Package: N/A
|
||||
* Status: Experimental (Do Not Distribute)
|
||||
*
|
||||
* (c) Copyright 1990, Hewlett-Packard Company.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -25,13 +20,16 @@
|
||||
/*----------------------------------------------------------------------
|
||||
I N C L U D E S
|
||||
----------------------------------------------------------------------*/
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
|
||||
#include "associate.h"
|
||||
#include "render.h"
|
||||
#include "callcpp.h"
|
||||
#include "wordrec.h"
|
||||
#include "blamer.h" // for blamer_bundle
|
||||
#include "callcpp.h" // for window_wait, C_COL
|
||||
#include "params.h" // for BoolParam
|
||||
#include "render.h" // for display_blob, blob_window, wordrec_blob_pause
|
||||
#include "wordrec.h" // for Wordrec
|
||||
|
||||
class BLOB_CHOICE_LIST;
|
||||
|
||||
struct TBLOB;
|
||||
|
||||
// Include automatically generated configuration file if running autoconf.
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -19,24 +19,43 @@
|
||||
#ifndef TESSERACT_WORDREC_WORDREC_H_
|
||||
#define TESSERACT_WORDREC_WORDREC_H_
|
||||
|
||||
// Include automatically generated configuration file if running autoconf.
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config_auto.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DISABLED_LEGACY_ENGINE
|
||||
|
||||
#include "classify.h"
|
||||
#include "dict.h"
|
||||
#include "ratngs.h"
|
||||
#include "matrix.h"
|
||||
#include "callcpp.h"
|
||||
#include "config_auto.h"
|
||||
|
||||
#include <memory>
|
||||
#include <cstdint> // for int16_t, int32_t
|
||||
#include "callcpp.h" // for C_COL
|
||||
#include "chop.h" // for PointHeap, MAX_NUM_POINTS
|
||||
#include "classify.h" // for Classify
|
||||
#include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK
|
||||
#include "findseam.h" // for SeamQueue, SeamPile
|
||||
#include "genericvector.h" // for GenericVector
|
||||
#include "oldlist.h" // for LIST
|
||||
#include "params.h" // for INT_VAR_H, IntParam, BOOL_VAR_H, BoolP...
|
||||
#include "points.h" // for ICOORD
|
||||
#include "ratngs.h" // for BLOB_CHOICE_LIST (ptr only), BLOB_CHOI...
|
||||
#include "seam.h" // for SEAM (ptr only), PRIORITY
|
||||
#include "stopper.h" // for DANGERR
|
||||
|
||||
class EDGEPT_CLIST;
|
||||
class MATRIX;
|
||||
class STRING;
|
||||
class TBOX;
|
||||
class UNICHARSET;
|
||||
class WERD_RES;
|
||||
|
||||
namespace tesseract { class LMPainPoints; }
|
||||
namespace tesseract { class TessdataManager; }
|
||||
namespace tesseract { struct BestChoiceBundle; }
|
||||
|
||||
struct BlamerBundle;
|
||||
struct EDGEPT;
|
||||
struct MATRIX_COORD;
|
||||
struct SPLIT;
|
||||
struct TBLOB;
|
||||
struct TESSLINE;
|
||||
struct TWERD;
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
/* ccmain/tstruct.cpp */
|
||||
|
Loading…
Reference in New Issue
Block a user