mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 14:41:36 +08:00
Clean more include files and include statements
The changes are based on an analysis done with include-what-you-use. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
a32d24fa65
commit
7768f9b336
@ -1,8 +1,8 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* File: control.h (Formerly control.h)
|
* File: control.h (Formerly control.h)
|
||||||
* Description: Module-independent matcher controller.
|
* Description: Module-independent matcher controller.
|
||||||
* Author: Ray Smith
|
* Author: Ray Smith
|
||||||
* Created: Thu Apr 23 11:09:58 BST 1992
|
* Created: Thu Apr 23 11:09:58 BST 1992
|
||||||
*
|
*
|
||||||
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -22,14 +22,8 @@
|
|||||||
* Module-independent matcher controller.
|
* Module-independent matcher controller.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONTROL_H
|
#ifndef CONTROL_H
|
||||||
#define CONTROL_H
|
#define CONTROL_H
|
||||||
|
|
||||||
#include "params.h"
|
|
||||||
#include "ocrblock.h"
|
|
||||||
#include "ratngs.h"
|
|
||||||
#include "statistc.h"
|
|
||||||
#include "pageres.h"
|
|
||||||
|
|
||||||
enum ACCEPTABLE_WERD_TYPE
|
enum ACCEPTABLE_WERD_TYPE
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/******************************************************************
|
/******************************************************************
|
||||||
* File: docqual.h (Formerly docqual.h)
|
* File: docqual.h (Formerly docqual.h)
|
||||||
* Description: Document Quality Metrics
|
* Description: Document Quality Metrics
|
||||||
* Author: Phil Cheatle
|
* Author: Phil Cheatle
|
||||||
* Created: Mon May 9 11:27:28 BST 1994
|
* Created: Mon May 9 11:27:28 BST 1994
|
||||||
*
|
*
|
||||||
* (C) Copyright 1994, Hewlett-Packard Ltd.
|
* (C) Copyright 1994, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -17,10 +17,14 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifndef DOCQUAL_H
|
#ifndef DOCQUAL_H
|
||||||
#define DOCQUAL_H
|
#define DOCQUAL_H
|
||||||
|
|
||||||
#include "control.h"
|
#include <cstdint> // for int16_t
|
||||||
|
|
||||||
|
class PAGE_RES_IT;
|
||||||
|
class ROW;
|
||||||
|
class WERD_RES;
|
||||||
|
|
||||||
enum GARBAGE_LEVEL
|
enum GARBAGE_LEVEL
|
||||||
{
|
{
|
||||||
@ -32,4 +36,5 @@ enum GARBAGE_LEVEL
|
|||||||
|
|
||||||
int16_t word_blob_quality(WERD_RES *word, ROW *row);
|
int16_t word_blob_quality(WERD_RES *word, ROW *row);
|
||||||
void reject_whole_page(PAGE_RES_IT &page_res_it);
|
void reject_whole_page(PAGE_RES_IT &page_res_it);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,16 +20,12 @@
|
|||||||
#ifndef TESSERACT_CCMAIN_EQUATIONDETECT_H_
|
#ifndef TESSERACT_CCMAIN_EQUATIONDETECT_H_
|
||||||
#define TESSERACT_CCMAIN_EQUATIONDETECT_H_
|
#define TESSERACT_CCMAIN_EQUATIONDETECT_H_
|
||||||
|
|
||||||
#include "blobbox.h"
|
#include "blobbox.h" // for BLOBNBOX (ptr only), BlobSpecialText...
|
||||||
#include "equationdetectbase.h"
|
#include "equationdetectbase.h" // for EquationDetectBase
|
||||||
#include "genericvector.h"
|
#include "genericvector.h" // for GenericVector
|
||||||
#include "tesseractclass.h"
|
#include "tesseractclass.h" // for Tesseract
|
||||||
#include "unichar.h"
|
#include "unichar.h" // for UNICHAR_ID
|
||||||
|
|
||||||
class BLOBNBOX;
|
|
||||||
class BLOB_CHOICE;
|
|
||||||
class BLOB_CHOICE_LIST;
|
|
||||||
class TO_BLOCK_LIST;
|
|
||||||
class TBOX;
|
class TBOX;
|
||||||
class UNICHARSET;
|
class UNICHARSET;
|
||||||
|
|
||||||
|
@ -1,31 +1,32 @@
|
|||||||
/******************************************************************
|
/******************************************************************
|
||||||
* File: fixspace.h (Formerly fixspace.h)
|
* File: fixspace.h (Formerly fixspace.h)
|
||||||
* Description: Implements a pass over the page res, exploring the alternative
|
* Description: Implements a pass over the page res, exploring the alternative
|
||||||
* spacing possibilities, trying to use context to improve the
|
* spacing possibilities, trying to use context to improve the
|
||||||
word spacing
|
* word spacing
|
||||||
* Author: Phil Cheatle
|
* Author: Phil Cheatle
|
||||||
* Created: Thu Oct 21 11:38:43 BST 1993
|
* Created: Thu Oct 21 11:38:43 BST 1993
|
||||||
*
|
*
|
||||||
* (C) Copyright 1993, Hewlett-Packard Ltd.
|
* (C) Copyright 1993, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
** See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
** limitations under the License.
|
||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifndef FIXSPACE_H
|
#ifndef FIXSPACE_H
|
||||||
#define FIXSPACE_H
|
#define FIXSPACE_H
|
||||||
|
|
||||||
#include "pageres.h"
|
class WERD_RES;
|
||||||
#include "params.h"
|
class WERD_RES_LIST;
|
||||||
|
|
||||||
void initialise_search(WERD_RES_LIST &src_list, WERD_RES_LIST &new_list);
|
void initialise_search(WERD_RES_LIST &src_list, WERD_RES_LIST &new_list);
|
||||||
void transform_to_next_perm(WERD_RES_LIST &words);
|
void transform_to_next_perm(WERD_RES_LIST &words);
|
||||||
void fixspace_dbg(WERD_RES *word);
|
void fixspace_dbg(WERD_RES *word);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,13 +20,15 @@
|
|||||||
#ifndef TESSERACT_CCMAIN_OSDETECT_H_
|
#ifndef TESSERACT_CCMAIN_OSDETECT_H_
|
||||||
#define TESSERACT_CCMAIN_OSDETECT_H_
|
#define TESSERACT_CCMAIN_OSDETECT_H_
|
||||||
|
|
||||||
#include "strngs.h"
|
#include "platform.h" // for TESS_API
|
||||||
#include "unicharset.h"
|
|
||||||
|
|
||||||
class TO_BLOCK_LIST;
|
|
||||||
class BLOBNBOX;
|
class BLOBNBOX;
|
||||||
class BLOB_CHOICE_LIST;
|
|
||||||
class BLOBNBOX_CLIST;
|
class BLOBNBOX_CLIST;
|
||||||
|
class BLOB_CHOICE_LIST;
|
||||||
|
class STRING;
|
||||||
|
class TO_BLOCK_LIST;
|
||||||
|
class UNICHARSET;
|
||||||
|
template <typename T> class GenericVector;
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
class Tesseract;
|
class Tesseract;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/******************************************************************
|
/******************************************************************
|
||||||
* File: output.h (Formerly output.h)
|
* File: output.h (Formerly output.h)
|
||||||
* Description: Output pass
|
* Description: Output pass
|
||||||
* Author: Phil Cheatle
|
* Author: Phil Cheatle
|
||||||
* Created: Thu Aug 4 10:56:08 BST 1994
|
* Created: Thu Aug 4 10:56:08 BST 1994
|
||||||
*
|
*
|
||||||
* (C) Copyright 1994, Hewlett-Packard Ltd.
|
* (C) Copyright 1994, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -17,12 +17,11 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifndef OUTPUT_H
|
#ifndef OUTPUT_H
|
||||||
#define OUTPUT_H
|
#define OUTPUT_H
|
||||||
|
|
||||||
#include "params.h"
|
class BLOCK;
|
||||||
//#include "epapconv.h"
|
class WERD;
|
||||||
#include "pageres.h"
|
|
||||||
|
|
||||||
/** test line ends */
|
/** test line ends */
|
||||||
char determine_newline_type(WERD *word, ///< word to do
|
char determine_newline_type(WERD *word, ///< word to do
|
||||||
@ -30,4 +29,5 @@ char determine_newline_type(WERD *word, ///< word to do
|
|||||||
WERD *next_word, ///< next word
|
WERD *next_word, ///< next word
|
||||||
BLOCK *next_block ///< block of next word
|
BLOCK *next_block ///< block of next word
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,25 +17,36 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <memory> // std::unique_ptr
|
|
||||||
|
|
||||||
#include "genericvector.h"
|
|
||||||
#include "helpers.h"
|
|
||||||
#include "mutableiterator.h"
|
|
||||||
#include "ocrpara.h"
|
|
||||||
#include "pageres.h"
|
|
||||||
#include "paragraphs.h"
|
#include "paragraphs.h"
|
||||||
#include "paragraphs_internal.h"
|
#include <ctype.h> // for isspace
|
||||||
#include "publictypes.h"
|
#include <math.h> // for abs
|
||||||
#include "ratngs.h"
|
#include <stdio.h> // for snprintf
|
||||||
#include "rect.h"
|
#include <stdlib.h> // for abs
|
||||||
#include "statistc.h"
|
#include <string.h> // for strchr, strlen
|
||||||
#include "strngs.h"
|
#include <algorithm> // for max
|
||||||
#include "tprintf.h"
|
#include <memory> // for unique_ptr
|
||||||
#include "unicharset.h"
|
#include "genericvector.h" // for GenericVector, GenericVectorEqEq
|
||||||
#include "unicodes.h"
|
#include "helpers.h" // for UpdateRange, ClipToRange
|
||||||
|
#include "host.h" // for NearlyEqual
|
||||||
|
#include "mutableiterator.h" // for MutableIterator
|
||||||
|
#include "ocrblock.h" // for BLOCK
|
||||||
|
#include "ocrpara.h" // for ParagraphModel, PARA, PARA_IT, PARA...
|
||||||
|
#include "ocrrow.h" // for ROW
|
||||||
|
#include "pageiterator.h" // for PageIterator
|
||||||
|
#include "pageres.h" // for PAGE_RES_IT, WERD_RES, ROW_RES, BLO...
|
||||||
|
#include "paragraphs_internal.h" // for RowScratchRegisters, SetOfModels
|
||||||
|
#include "pdblock.h" // for PDBLK
|
||||||
|
#include "polyblk.h" // for POLY_BLOCK
|
||||||
|
#include "publictypes.h" // for JUSTIFICATION_LEFT, JUSTIFICATION_R...
|
||||||
|
#include "ratngs.h" // for WERD_CHOICE
|
||||||
|
#include "rect.h" // for TBOX
|
||||||
|
#include "statistc.h" // for STATS
|
||||||
|
#include "strngs.h" // for STRING
|
||||||
|
#include "tprintf.h" // for tprintf
|
||||||
|
#include "unichar.h" // for UNICHAR, UNICHAR_ID
|
||||||
|
#include "unicharset.h" // for UNICHARSET
|
||||||
|
#include "unicodes.h" // for kPDF, kRLE
|
||||||
|
#include "werd.h" // for WERD, W_REP_CHAR
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
|
||||||
|
@ -20,14 +20,15 @@
|
|||||||
#ifndef TESSERACT_CCMAIN_PARAGRAPHS_H_
|
#ifndef TESSERACT_CCMAIN_PARAGRAPHS_H_
|
||||||
#define TESSERACT_CCMAIN_PARAGRAPHS_H_
|
#define TESSERACT_CCMAIN_PARAGRAPHS_H_
|
||||||
|
|
||||||
#include "rect.h"
|
#include "rect.h" // for TBOX
|
||||||
#include "ocrpara.h"
|
#include "strngs.h" // for STRING
|
||||||
#include "genericvector.h"
|
|
||||||
#include "strngs.h"
|
|
||||||
|
|
||||||
|
class PARA_LIST;
|
||||||
|
class ParagraphModel;
|
||||||
|
|
||||||
class WERD;
|
struct PARA;
|
||||||
class UNICHARSET;
|
|
||||||
|
template <typename T> class GenericVector;
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
|
||||||
|
@ -19,14 +19,6 @@
|
|||||||
//
|
//
|
||||||
// The parameters editor is used to edit all the parameters used within
|
// The parameters editor is used to edit all the parameters used within
|
||||||
// tesseract from the ui.
|
// tesseract from the ui.
|
||||||
#ifdef _WIN32
|
|
||||||
#else
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstdio>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <map>
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
// Include automatically generated configuration file if running autoconf.
|
// Include automatically generated configuration file if running autoconf.
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
@ -34,13 +26,19 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GRAPHICS_DISABLED
|
#ifndef GRAPHICS_DISABLED
|
||||||
|
|
||||||
#include "paramsd.h"
|
#include "paramsd.h"
|
||||||
|
#include <cstdio> // for fclose, fopen, fprintf, sprintf, FILE
|
||||||
|
#include <cstdlib> // for atoi, strtod
|
||||||
#include "params.h"
|
#include <cstring> // for strcmp, strcspn, strlen, strncpy
|
||||||
#include "scrollview.h"
|
#include <map> // for map, _Rb_tree_iterator, map<>::iterator
|
||||||
#include "svmnode.h"
|
#include <memory> // for unique_ptr
|
||||||
|
#include <utility> // for pair
|
||||||
|
#include "genericvector.h" // for GenericVector
|
||||||
|
#include "params.h" // for ParamsVectors, StringParam, BoolParam
|
||||||
|
#include "scrollview.h" // for SVEvent, ScrollView, SVET_POPUP
|
||||||
|
#include "svmnode.h" // for SVMenuNode
|
||||||
|
#include "tesseractclass.h" // for Tesseract
|
||||||
|
|
||||||
#define VARDIR "configs/" /*parameters files */
|
#define VARDIR "configs/" /*parameters files */
|
||||||
#define MAX_ITEMS_IN_SUBMENU 30
|
#define MAX_ITEMS_IN_SUBMENU 30
|
||||||
@ -354,4 +352,4 @@ void ParamsEditor::WriteParams(char *filename,
|
|||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif // GRAPHICS_DISABLED
|
||||||
|
@ -24,12 +24,20 @@
|
|||||||
|
|
||||||
#ifndef GRAPHICS_DISABLED
|
#ifndef GRAPHICS_DISABLED
|
||||||
|
|
||||||
#include "elst.h"
|
#include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK
|
||||||
#include "params.h"
|
#include "scrollview.h" // for ScrollView (ptr only), SVEvent (ptr only)
|
||||||
#include "tesseractclass.h"
|
#include "strngs.h" // for STRING
|
||||||
|
|
||||||
class SVMenuNode;
|
class SVMenuNode;
|
||||||
|
|
||||||
|
namespace tesseract {
|
||||||
|
class BoolParam;
|
||||||
|
class DoubleParam;
|
||||||
|
class IntParam;
|
||||||
|
class StringParam;
|
||||||
|
class Tesseract;
|
||||||
|
}
|
||||||
|
|
||||||
// A list of all possible parameter types used.
|
// A list of all possible parameter types used.
|
||||||
enum ParamType {
|
enum ParamType {
|
||||||
VT_INTEGER,
|
VT_INTEGER,
|
||||||
|
@ -17,19 +17,18 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef PGEDIT_H
|
#ifndef PGEDIT_H
|
||||||
#define PGEDIT_H
|
#define PGEDIT_H
|
||||||
|
|
||||||
#include "ocrblock.h"
|
#include "params.h" // for INT_VAR_H, IntParam, STRING_VAR_H, StringParam
|
||||||
#include "ocrrow.h"
|
#include "scrollview.h" // for SVEvent (ptr only), SVEventHandler, ScrollView
|
||||||
#include "werd.h"
|
|
||||||
#include "rect.h"
|
|
||||||
#include "params.h"
|
|
||||||
#include "tesseractclass.h"
|
|
||||||
|
|
||||||
class ScrollView;
|
class BLOCK_LIST;
|
||||||
class SVMenuNode;
|
class PAGE_RES;
|
||||||
struct SVEvent;
|
|
||||||
|
namespace tesseract {
|
||||||
|
class Tesseract;
|
||||||
|
}
|
||||||
|
|
||||||
// A small event handler class to process incoming events to
|
// A small event handler class to process incoming events to
|
||||||
// this window.
|
// this window.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* File: reject.h (Formerly reject.h)
|
* File: reject.h
|
||||||
* Description: Rejection functions used in tessedit
|
* Description: Rejection functions used in tessedit
|
||||||
* Author: Phil Cheatle
|
* Author: Phil Cheatle
|
||||||
* Created: Wed Sep 23 16:50:21 BST 1992
|
* Created: Wed Sep 23 16:50:21 BST 1992
|
||||||
*
|
*
|
||||||
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -17,11 +17,11 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifndef REJECT_H
|
#ifndef REJECT_H
|
||||||
#define REJECT_H
|
#define REJECT_H
|
||||||
|
|
||||||
#include "params.h"
|
class WERD_CHOICE;
|
||||||
#include "pageres.h"
|
class WERD_RES;
|
||||||
|
|
||||||
void reject_blanks(WERD_RES *word);
|
void reject_blanks(WERD_RES *word);
|
||||||
void reject_poor_matches(WERD_RES *word);
|
void reject_poor_matches(WERD_RES *word);
|
||||||
@ -31,4 +31,5 @@ void dont_allow_1Il(WERD_RES *word);
|
|||||||
void flip_hyphens(WERD_RES *word);
|
void flip_hyphens(WERD_RES *word);
|
||||||
void flip_0O(WERD_RES *word);
|
void flip_0O(WERD_RES *word);
|
||||||
bool non_0_digit(const char* str, int length);
|
bool non_0_digit(const char* str, int length);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,13 +22,14 @@
|
|||||||
#ifndef TESSERACT_CCMAIN_RESULT_ITERATOR_H_
|
#ifndef TESSERACT_CCMAIN_RESULT_ITERATOR_H_
|
||||||
#define TESSERACT_CCMAIN_RESULT_ITERATOR_H_
|
#define TESSERACT_CCMAIN_RESULT_ITERATOR_H_
|
||||||
|
|
||||||
#include "platform.h"
|
#include "ltrresultiterator.h" // for LTRResultIterator
|
||||||
#include "ltrresultiterator.h"
|
#include "platform.h" // for TESS_API, TESS_LOCAL
|
||||||
|
#include "publictypes.h" // for PageIteratorLevel
|
||||||
|
#include "unichar.h" // for StrongScriptDirection
|
||||||
|
|
||||||
template <typename T> class GenericVector;
|
template <typename T> class GenericVector;
|
||||||
template <typename T> class GenericVectorEqEq;
|
template <typename T> class GenericVectorEqEq;
|
||||||
class BLOB_CHOICE_IT;
|
|
||||||
class WERD_RES;
|
|
||||||
class STRING;
|
class STRING;
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* File: tessedit.h (Formerly tessedit.h)
|
* File: tessedit.h (Formerly tessedit.h)
|
||||||
* Description: Main program for merge of tess and editor.
|
* Description: Main program for merge of tess and editor.
|
||||||
* Author: Ray Smith
|
* Author: Ray Smith
|
||||||
* Created: Tue Jan 07 15:21:46 GMT 1992
|
* Created: Tue Jan 07 15:21:46 GMT 1992
|
||||||
*
|
*
|
||||||
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -17,11 +17,10 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifndef TESSEDIT_H
|
#ifndef TESSEDIT_H
|
||||||
#define TESSEDIT_H
|
#define TESSEDIT_H
|
||||||
|
|
||||||
#include "blobs.h"
|
class ETEXT_DESC;
|
||||||
#include "pgedit.h"
|
|
||||||
|
|
||||||
//progress monitor
|
//progress monitor
|
||||||
extern ETEXT_DESC *global_monitor;
|
extern ETEXT_DESC *global_monitor;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* File: werdit.cpp (Formerly wordit.c)
|
* File: werdit.cpp (Formerly wordit.c)
|
||||||
* Description: An iterator for passing over all the words in a document.
|
* Description: An iterator for passing over all the words in a document.
|
||||||
* Author: Ray Smith
|
* Author: Ray Smith
|
||||||
* Created: Mon Apr 27 08:51:22 BST 1992
|
* Created: Mon Apr 27 08:51:22 BST 1992
|
||||||
*
|
*
|
||||||
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -18,6 +18,10 @@
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "werdit.h"
|
#include "werdit.h"
|
||||||
|
#include "errcode.h" // for ASSERT_HOST
|
||||||
|
#include "pageres.h" // for PAGE_RES_IT, PAGE_RES (ptr only), WERD_RES
|
||||||
|
#include "stepblob.h" // for C_BLOB_IT, C_BLOB, C_BLOB_LIST
|
||||||
|
#include "werd.h" // for WERD
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* make_pseudo_word
|
* make_pseudo_word
|
||||||
|
@ -17,10 +17,12 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifndef WERDIT_H
|
#ifndef WERDIT_H
|
||||||
#define WERDIT_H
|
#define WERDIT_H
|
||||||
|
|
||||||
#include "pageres.h"
|
#include "rect.h" // for TBOX
|
||||||
|
class PAGE_RES;
|
||||||
|
class PAGE_RES_IT;
|
||||||
|
|
||||||
PAGE_RES_IT* make_pseudo_word(PAGE_RES* page_res, const TBOX& selection_box);
|
PAGE_RES_IT* make_pseudo_word(PAGE_RES* page_res, const TBOX& selection_box);
|
||||||
|
|
||||||
|
@ -21,14 +21,25 @@
|
|||||||
#ifndef TESSERACT_CCSTRUCT_BLAMER_H_
|
#ifndef TESSERACT_CCSTRUCT_BLAMER_H_
|
||||||
#define TESSERACT_CCSTRUCT_BLAMER_H_
|
#define TESSERACT_CCSTRUCT_BLAMER_H_
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdint> // for int16_t
|
||||||
#include "boxword.h"
|
#include <cstring> // for memcpy
|
||||||
#include "genericvector.h"
|
#include "boxword.h" // for BoxWord
|
||||||
#include "matrix.h"
|
#include "genericvector.h" // for GenericVector
|
||||||
#include "params_training_featdef.h"
|
#include "matrix.h" // for MATRIX_COORD, MATRIX (ptr only)
|
||||||
#include "ratngs.h"
|
#include "params_training_featdef.h" // for ParamsTrainingBundle, ParamsTra...
|
||||||
#include "strngs.h"
|
#include "ratngs.h" // for BLOB_CHOICE_LIST (ptr only)
|
||||||
#include "tesscallback.h"
|
#include "rect.h" // for TBOX
|
||||||
|
#include "strngs.h" // for STRING
|
||||||
|
#include "tprintf.h" // for tprintf
|
||||||
|
#include "unichar.h" // for UNICHAR_ID
|
||||||
|
|
||||||
|
class DENORM;
|
||||||
|
class UNICHARSET;
|
||||||
|
class WERD_RES;
|
||||||
|
|
||||||
|
struct TWERD;
|
||||||
|
|
||||||
|
template <class R, class A1, class A2> class TessResultCallback2;
|
||||||
|
|
||||||
static const int16_t kBlamerBoxTolerance = 5;
|
static const int16_t kBlamerBoxTolerance = 5;
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "blobbox.h"
|
#include "blobbox.h"
|
||||||
#include <stdint.h> // for INT32_MAX, INT16_MAX
|
|
||||||
#include <algorithm> // for max, min
|
#include <algorithm> // for max, min
|
||||||
|
#include <cstdint> // for INT32_MAX, INT16_MAX
|
||||||
#include "allheaders.h" // for pixGetHeight, pixGetPixel
|
#include "allheaders.h" // for pixGetHeight, pixGetPixel
|
||||||
#include "blobs.h" // for TPOINT
|
#include "blobs.h" // for TPOINT
|
||||||
#include "coutln.h" // for C_OUTLINE_IT, C_OUTLINE, C_OUTLINE_LIST
|
#include "coutln.h" // for C_OUTLINE_IT, C_OUTLINE, C_OUTLINE_LIST
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* File: blobbox.h (Formerly blobnbox.h)
|
* File: blobbox.h (Formerly blobnbox.h)
|
||||||
* Description: Code for the textord blob class.
|
* Description: Code for the textord blob class.
|
||||||
* Author: Ray Smith
|
* Author: Ray Smith
|
||||||
* Created: Thu Jul 30 09:08:51 BST 1992
|
* Created: Thu Jul 30 09:08:51 BST 1992
|
||||||
*
|
*
|
||||||
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -17,14 +17,30 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifndef BLOBBOX_H
|
#ifndef BLOBBOX_H
|
||||||
#define BLOBBOX_H
|
#define BLOBBOX_H
|
||||||
|
|
||||||
#include "clst.h"
|
#include <cinttypes> // for PRId32
|
||||||
#include "elst2.h"
|
#include <cmath> // for sqrt
|
||||||
#include "werd.h"
|
#include <cstdint> // for int16_t, int32_t
|
||||||
#include "ocrblock.h"
|
#include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK
|
||||||
#include "statistc.h"
|
#include "elst2.h" // for ELIST2_ITERATOR, ELIST2IZEH, ELIST2_LINK
|
||||||
|
#include "errcode.h" // for ASSERT_HOST
|
||||||
|
#include "ocrblock.h" // for BLOCK
|
||||||
|
#include "params.h" // for DoubleParam, double_VAR_H
|
||||||
|
#include "pdblock.h" // for PDBLK
|
||||||
|
#include "points.h" // for FCOORD, ICOORD, ICOORDELT_LIST
|
||||||
|
#include "quspline.h" // for QSPLINE
|
||||||
|
#include "rect.h" // for TBOX
|
||||||
|
#include "scrollview.h" // for ScrollView, ScrollView::Color
|
||||||
|
#include "statistc.h" // for STATS
|
||||||
|
#include "stepblob.h" // for C_BLOB
|
||||||
|
#include "tprintf.h" // for tprintf
|
||||||
|
#include "werd.h" // for WERD_LIST
|
||||||
|
|
||||||
|
class C_OUTLINE;
|
||||||
|
|
||||||
|
struct Pix;
|
||||||
|
|
||||||
enum PITCH_TYPE
|
enum PITCH_TYPE
|
||||||
{
|
{
|
||||||
|
@ -29,11 +29,16 @@
|
|||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
I n c l u d e s
|
I n c l u d e s
|
||||||
----------------------------------------------------------------------*/
|
----------------------------------------------------------------------*/
|
||||||
#include "clst.h"
|
#include <cstdint> // for int16_t
|
||||||
#include "normalis.h"
|
#include <cstring> // for memcpy, memset
|
||||||
#include "publictypes.h"
|
#include "clst.h" // for CLIST_ITERATOR, CLISTIZEH
|
||||||
#include "rect.h"
|
#include "genericvector.h" // for GenericVector
|
||||||
#include "vecfuncs.h"
|
#include "normalis.h" // for DENORM
|
||||||
|
#include "points.h" // for FCOORD, ICOORD
|
||||||
|
#include "publictypes.h" // for OcrEngineMode
|
||||||
|
#include "rect.h" // for TBOX
|
||||||
|
#include "scrollview.h" // for ScrollView, ScrollView::Color
|
||||||
|
#include "vecfuncs.h" // for CROSS
|
||||||
|
|
||||||
class BLOCK;
|
class BLOCK;
|
||||||
class C_BLOB;
|
class C_BLOB;
|
||||||
@ -42,6 +47,8 @@ class LLSQ;
|
|||||||
class ROW;
|
class ROW;
|
||||||
class WERD;
|
class WERD;
|
||||||
|
|
||||||
|
struct Pix;
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
T y p e s
|
T y p e s
|
||||||
----------------------------------------------------------------------*/
|
----------------------------------------------------------------------*/
|
||||||
|
@ -17,10 +17,11 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "scanutils.h"
|
|
||||||
#include "fileerr.h"
|
|
||||||
#include "blread.h"
|
#include "blread.h"
|
||||||
|
#include <cstdio> // for fclose, fopen, FILE
|
||||||
|
#include "host.h" // for TRUE
|
||||||
|
#include "ocrblock.h" // for BLOCK_IT, BLOCK, BLOCK_LIST (ptr only)
|
||||||
|
#include "scanutils.h" // for tfscanf
|
||||||
|
|
||||||
#define UNLV_EXT ".uzn" // unlv zone file
|
#define UNLV_EXT ".uzn" // unlv zone file
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* File: blread.h (Formerly pdread.h)
|
* File: blread.h (Formerly pdread.h)
|
||||||
* Description: Friend function of BLOCK to read the uscan pd file.
|
* Description: Friend function of BLOCK to read the uscan pd file.
|
||||||
* Author: Ray Smith
|
* Author: Ray Smith
|
||||||
* Created: Mon Mar 18 14:39:00 GMT 1991
|
* Created: Mon Mar 18 14:39:00 GMT 1991
|
||||||
*
|
*
|
||||||
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -17,11 +17,13 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifndef BLREAD_H
|
#ifndef BLREAD_H
|
||||||
#define BLREAD_H
|
#define BLREAD_H
|
||||||
|
|
||||||
#include "params.h"
|
#include <cstdint> // for int32_t
|
||||||
#include "ocrblock.h"
|
#include "strngs.h" // for STRING
|
||||||
|
|
||||||
|
class BLOCK_LIST;
|
||||||
|
|
||||||
bool read_unlv_file( //print list of sides
|
bool read_unlv_file( //print list of sides
|
||||||
STRING name, //basename of file
|
STRING name, //basename of file
|
||||||
@ -30,4 +32,5 @@ bool read_unlv_file( //print list of sides
|
|||||||
BLOCK_LIST *blocks //output list
|
BLOCK_LIST *blocks //output list
|
||||||
);
|
);
|
||||||
void FullPageBlock(int width, int height, BLOCK_LIST *blocks);
|
void FullPageBlock(int width, int height, BLOCK_LIST *blocks);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* File: boxread.h
|
* File: boxread.h
|
||||||
* Description: Read data from a box file.
|
* Description: Read data from a box file.
|
||||||
* Author: Ray Smith
|
* Author: Ray Smith
|
||||||
* Created: Fri Aug 24 17:47:23 PDT 2007
|
* Created: Fri Aug 24 17:47:23 PDT 2007
|
||||||
*
|
*
|
||||||
* (C) Copyright 2007, Google Inc.
|
* (C) Copyright 2007, Google Inc.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -20,13 +20,14 @@
|
|||||||
#ifndef TESSERACT_CCUTIL_BOXREAD_H_
|
#ifndef TESSERACT_CCUTIL_BOXREAD_H_
|
||||||
#define TESSERACT_CCUTIL_BOXREAD_H_
|
#define TESSERACT_CCUTIL_BOXREAD_H_
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio> // for FILE
|
||||||
#include "genericvector.h"
|
#include "strngs.h" // for STRING
|
||||||
#include "strngs.h"
|
|
||||||
|
|
||||||
class STRING;
|
|
||||||
class TBOX;
|
class TBOX;
|
||||||
|
|
||||||
|
template <typename T> class GenericVector;
|
||||||
|
template <typename T> class GenericVector;
|
||||||
|
|
||||||
// Size of buffer used to read a line from a box file.
|
// Size of buffer used to read a line from a box file.
|
||||||
const int kBoxReadBufSize = 1024;
|
const int kBoxReadBufSize = 1024;
|
||||||
|
|
||||||
|
@ -20,17 +20,15 @@
|
|||||||
#ifndef TESSERACT_CSTRUCT_BOXWORD_H_
|
#ifndef TESSERACT_CSTRUCT_BOXWORD_H_
|
||||||
#define TESSERACT_CSTRUCT_BOXWORD_H_
|
#define TESSERACT_CSTRUCT_BOXWORD_H_
|
||||||
|
|
||||||
#include "genericvector.h"
|
#include "genericvector.h" // for GenericVector
|
||||||
#include "rect.h"
|
#include "rect.h" // for TBOX
|
||||||
#include "unichar.h"
|
|
||||||
|
|
||||||
class BLOCK;
|
class BLOCK;
|
||||||
class DENORM;
|
|
||||||
struct TWERD;
|
|
||||||
class UNICHARSET;
|
|
||||||
class WERD;
|
class WERD;
|
||||||
class WERD_CHOICE;
|
|
||||||
class WERD_RES;
|
struct TWERD;
|
||||||
|
|
||||||
|
template <class A1> class TessCallback1;
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef TESSERACT_CCSTRUCT_CCSTRUCT_H_
|
#ifndef TESSERACT_CCSTRUCT_CCSTRUCT_H_
|
||||||
#define TESSERACT_CCSTRUCT_CCSTRUCT_H_
|
#define TESSERACT_CCSTRUCT_CCSTRUCT_H_
|
||||||
|
|
||||||
#include "cutil.h"
|
#include "cutil_class.h" // for CUtil
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
class CCStruct : public CUtil {
|
class CCStruct : public CUtil {
|
||||||
@ -36,8 +36,6 @@ class CCStruct : public CUtil {
|
|||||||
// Derived value giving the x-height as a fraction of cap-height.
|
// Derived value giving the x-height as a fraction of cap-height.
|
||||||
static const double kXHeightCapRatio; // = XHeight/(XHeight + Ascender).
|
static const double kXHeightCapRatio; // = XHeight/(XHeight + Ascender).
|
||||||
};
|
};
|
||||||
|
|
||||||
class Tesseract;
|
|
||||||
} // namespace tesseract
|
} // namespace tesseract
|
||||||
|
|
||||||
#endif // TESSERACT_CCSTRUCT_CCSTRUCT_H_
|
#endif // TESSERACT_CCSTRUCT_CCSTRUCT_H_
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* File: coutln.h (Formerly:
|
* File: coutln.h
|
||||||
*coutline.c) Description: Code for the C_OUTLINE class. Author:
|
* Description: Code for the C_OUTLINE class.
|
||||||
*Ray Smith
|
* Author: Ray Smith
|
||||||
* Created: Mon Oct 07 16:01:57 BST 1991
|
* Created: Mon Oct 07 16:01:57 BST 1991
|
||||||
*
|
*
|
||||||
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -32,9 +32,7 @@
|
|||||||
#include "scrollview.h" // for ScrollView, ScrollView::Color
|
#include "scrollview.h" // for ScrollView, ScrollView::Color
|
||||||
|
|
||||||
class CRACKEDGE;
|
class CRACKEDGE;
|
||||||
class C_OUTLINE;
|
|
||||||
class DENORM;
|
class DENORM;
|
||||||
struct Pix;
|
|
||||||
|
|
||||||
#define INTERSECTING INT16_MAX//no winding number
|
#define INTERSECTING INT16_MAX//no winding number
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* File: linlsq.h (Formerly llsq.h)
|
* File: linlsq.h (Formerly llsq.h)
|
||||||
* Description: Linear Least squares fitting code.
|
* Description: Linear Least squares fitting code.
|
||||||
* Author: Ray Smith
|
* Author: Ray Smith
|
||||||
* Created: Thu Sep 12 08:44:51 BST 1991
|
* Created: Thu Sep 12 08:44:51 BST 1991
|
||||||
*
|
*
|
||||||
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -20,8 +20,10 @@
|
|||||||
#ifndef TESSERACT_CCSTRUCT_LINLSQ_H_
|
#ifndef TESSERACT_CCSTRUCT_LINLSQ_H_
|
||||||
#define TESSERACT_CCSTRUCT_LINLSQ_H_
|
#define TESSERACT_CCSTRUCT_LINLSQ_H_
|
||||||
|
|
||||||
#include "points.h"
|
#include <cstdint> // for int32_t
|
||||||
#include "params.h"
|
#include "points.h" // for FCOORD
|
||||||
|
|
||||||
|
template <typename T> class GenericVector;
|
||||||
|
|
||||||
class LLSQ {
|
class LLSQ {
|
||||||
public:
|
public:
|
||||||
|
@ -26,18 +26,23 @@
|
|||||||
** limitations under the License.
|
** limitations under the License.
|
||||||
*
|
*
|
||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
|
|
||||||
#ifndef TESSERACT_CCSTRUCT_MATRIX_H_
|
#ifndef TESSERACT_CCSTRUCT_MATRIX_H_
|
||||||
#define TESSERACT_CCSTRUCT_MATRIX_H_
|
#define TESSERACT_CCSTRUCT_MATRIX_H_
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm> // for max, min
|
||||||
#include <cmath>
|
#include <cmath> // for sqrt, fabs, isfinite
|
||||||
#include "kdpair.h"
|
#include <cstdint> // for int32_t
|
||||||
#include "points.h"
|
#include <cstdio> // for fread, fwrite, FILE
|
||||||
#include "serialis.h"
|
#include <cstring> // for memcpy
|
||||||
#include "unicharset.h"
|
#include "errcode.h" // for ASSERT_HOST
|
||||||
|
#include "helpers.h" // for ReverseN, ClipToRange
|
||||||
|
#include "kdpair.h" // for KDPairInc
|
||||||
|
#include "points.h" // for ICOORD
|
||||||
|
#include "serialis.h" // for TFile
|
||||||
|
|
||||||
class BLOB_CHOICE;
|
|
||||||
class BLOB_CHOICE_LIST;
|
class BLOB_CHOICE_LIST;
|
||||||
|
class UNICHARSET;
|
||||||
|
|
||||||
#define NOT_CLASSIFIED static_cast<BLOB_CHOICE_LIST*>(0)
|
#define NOT_CLASSIFIED static_cast<BLOB_CHOICE_LIST*>(0)
|
||||||
|
|
||||||
|
@ -17,26 +17,24 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifndef NORMALIS_H
|
#ifndef NORMALIS_H
|
||||||
#define NORMALIS_H
|
#define NORMALIS_H
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include "genericvector.h"
|
|
||||||
#include "host.h"
|
|
||||||
|
|
||||||
const int kBlnCellHeight = 256; // Full-height for baseline normalization.
|
const int kBlnCellHeight = 256; // Full-height for baseline normalization.
|
||||||
const int kBlnXHeight = 128; // x-height for baseline normalization.
|
const int kBlnXHeight = 128; // x-height for baseline normalization.
|
||||||
const int kBlnBaselineOffset = 64; // offset for baseline normalization.
|
const int kBlnBaselineOffset = 64; // offset for baseline normalization.
|
||||||
|
|
||||||
struct Pix;
|
|
||||||
class ROW; // Forward decl
|
|
||||||
class BLOCK;
|
class BLOCK;
|
||||||
class FCOORD;
|
class FCOORD;
|
||||||
struct TBLOB;
|
|
||||||
class TBOX;
|
class TBOX;
|
||||||
struct TPOINT;
|
|
||||||
class UNICHARSET;
|
class UNICHARSET;
|
||||||
|
|
||||||
|
struct Pix;
|
||||||
|
struct TBLOB;
|
||||||
|
struct TPOINT;
|
||||||
|
|
||||||
|
template <typename T> class GenericVector;
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
|
||||||
// Possible normalization methods. Use NEGATIVE values as these also
|
// Possible normalization methods. Use NEGATIVE values as these also
|
||||||
@ -314,4 +312,5 @@ class DENORM {
|
|||||||
float final_xshift_;
|
float final_xshift_;
|
||||||
float final_yshift_;
|
float final_yshift_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,14 +17,18 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifndef OCRROW_H
|
#ifndef OCRROW_H
|
||||||
#define OCRROW_H
|
#define OCRROW_H
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdint> // for int16_t, int32_t
|
||||||
|
#include <cstdio> // for FILE
|
||||||
#include "quspline.h"
|
#include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK
|
||||||
#include "werd.h"
|
#include "quspline.h" // for QSPLINE
|
||||||
|
#include "rect.h" // for TBOX
|
||||||
|
#include "scrollview.h" // for ScrollView, ScrollView::Color
|
||||||
|
#include "werd.h" // for WERD_LIST
|
||||||
|
|
||||||
|
class ICOORD;
|
||||||
class TO_ROW;
|
class TO_ROW;
|
||||||
|
|
||||||
struct PARA;
|
struct PARA;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* File: pageres.h (Formerly page_res.h)
|
* File: pageres.h (Formerly page_res.h)
|
||||||
* Description: Results classes used by control.c
|
* Description: Results classes used by control.c
|
||||||
* Author: Phil Cheatle
|
* Author: Phil Cheatle
|
||||||
* Created: Tue Sep 22 08:42:49 BST 1992
|
* Created: Tue Sep 22 08:42:49 BST 1992
|
||||||
*
|
*
|
||||||
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
||||||
@ -16,26 +16,43 @@
|
|||||||
** limitations under the License.
|
** limitations under the License.
|
||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
#ifndef PAGERES_H
|
|
||||||
#define PAGERES_H
|
|
||||||
|
|
||||||
#include "blamer.h"
|
#ifndef PAGERES_H
|
||||||
#include "blobs.h"
|
#define PAGERES_H
|
||||||
#include "boxword.h"
|
|
||||||
#include "elst.h"
|
#include <cstdint> // for int32_t, int16_t
|
||||||
#include "genericvector.h"
|
#include <sys/types.h> // for int8_t
|
||||||
#include "normalis.h"
|
#include "blamer.h" // for BlamerBundle (ptr only), IRR_NUM_REASONS
|
||||||
#include "ocrblock.h"
|
#include "clst.h" // for CLIST_ITERATOR, CLISTIZEH
|
||||||
#include "ocrrow.h"
|
#include "elst.h" // for ELIST_ITERATOR, ELIST_LINK, ELISTIZEH
|
||||||
#include "params_training_featdef.h"
|
#include "genericvector.h" // for GenericVector, PointerVector (ptr only)
|
||||||
#include "ratngs.h"
|
#include "matrix.h" // for MATRIX
|
||||||
#include "rejctmap.h"
|
#include "normalis.h" // for DENORM
|
||||||
#include "seam.h"
|
#include "ratngs.h" // for WERD_CHOICE, BLOB_CHOICE (ptr only)
|
||||||
#include "werd.h"
|
#include "rect.h" // for TBOX
|
||||||
|
#include "rejctmap.h" // for REJMAP
|
||||||
|
#include "strngs.h" // for STRING
|
||||||
|
#include "unichar.h" // for UNICHAR_ID, INVALID_UNICHAR_ID
|
||||||
|
#include "unicharset.h" // for UNICHARSET, UNICHARSET::Direction, UNI...
|
||||||
|
#include "werd.h" // for WERD, W_BOL, W_EOL
|
||||||
|
|
||||||
|
class BLOCK;
|
||||||
|
class BLOCK_LIST;
|
||||||
|
class BLOCK_RES;
|
||||||
|
class ROW;
|
||||||
|
class ROW_RES;
|
||||||
|
class SEAM;
|
||||||
|
class WERD_RES;
|
||||||
|
|
||||||
|
struct Pix;
|
||||||
|
struct TWERD;
|
||||||
|
|
||||||
|
template <class R, class A1, class A2> class TessResultCallback2;
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
struct FontInfo;
|
class BoxWord;
|
||||||
class Tesseract;
|
class Tesseract;
|
||||||
|
struct FontInfo;
|
||||||
}
|
}
|
||||||
using tesseract::FontInfo;
|
using tesseract::FontInfo;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
** Filename: adaptmatch.c
|
** Filename: adaptmatch.cpp
|
||||||
** Purpose: High level adaptive matcher.
|
** Purpose: High level adaptive matcher.
|
||||||
** Author: Dan Johnson
|
** Author: Dan Johnson
|
||||||
** History: Mon Mar 11 10:00:10 1991, DSJ, Created.
|
** History: Mon Mar 11 10:00:10 1991, DSJ, Created.
|
||||||
@ -23,43 +23,56 @@
|
|||||||
#include "config_auto.h"
|
#include "config_auto.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <algorithm> // for max, min
|
||||||
#include "shapeclassifier.h"
|
#include <cassert> // for assert
|
||||||
#include "ambigs.h"
|
#include <cmath> // for fabs
|
||||||
#include "blobclass.h"
|
#include <cstdint> // for INT32_MAX, UINT8_MAX
|
||||||
#include "blobs.h"
|
#include <cstdio> // for fflush, fclose, fopen, stdout, FILE
|
||||||
#include "callcpp.h"
|
#include <cstdlib> // for malloc
|
||||||
#include "classify.h"
|
#include <cstring> // for strstr, memset, strcmp
|
||||||
#include "const.h"
|
#include "adaptive.h" // for ADAPT_CLASS, free_adapted_templates
|
||||||
#include "dict.h"
|
#include "ambigs.h" // for UnicharIdVector, UnicharAmbigs
|
||||||
#include "efio.h"
|
#include "bitvec.h" // for FreeBitVector, NewBitVector, BIT_VECTOR
|
||||||
#include "emalloc.h"
|
#include "blobs.h" // for TBLOB, TWERD
|
||||||
#include "featdefs.h"
|
#include "callcpp.h" // for cprintf, window_wait
|
||||||
#include "float2int.h"
|
#include "classify.h" // for Classify, CST_FRAGMENT, CST_WHOLE
|
||||||
#include "genericvector.h"
|
#include "dict.h" // for Dict
|
||||||
#include "globals.h"
|
#include "errcode.h" // for ASSERT_HOST
|
||||||
#include "helpers.h"
|
#include "featdefs.h" // for CharNormDesc
|
||||||
#include "intfx.h"
|
#include "float2int.h" // for BASELINE_Y_SHIFT
|
||||||
#include "intproto.h"
|
#include "fontinfo.h" // for ScoredFont, FontSet
|
||||||
#include "mfoutline.h"
|
#include "genericvector.h" // for GenericVector
|
||||||
#include "normfeat.h"
|
#include "helpers.h" // for IntCastRounded, ClipToRange
|
||||||
#include "normmatch.h"
|
#include "host.h" // for FLOAT32, FALSE, MAX_FLOAT32, TRUE
|
||||||
#include "outfeat.h"
|
#include "intfx.h" // for BlobToTrainingSample, INT_FX_RESULT_S...
|
||||||
#include "pageres.h"
|
#include "intmatcher.h" // for CP_RESULT_STRUCT, IntegerMatcher
|
||||||
#include "params.h"
|
#include "intproto.h" // for INT_FEATURE_STRUCT, (anonymous), Clas...
|
||||||
#include "picofeat.h"
|
#include "matchdefs.h" // for CLASS_ID, FEATURE_ID, PROTO_ID, NO_PROTO
|
||||||
#include "shapetable.h"
|
#include "mfoutline.h" // for baseline, character, MF_SCALE_FACTOR
|
||||||
#include "tessclassifier.h"
|
#include "normalis.h" // for DENORM, kBlnBaselineOffset, kBlnXHeight
|
||||||
#include "trainingsample.h"
|
#include "normfeat.h" // for ActualOutlineLength, CharNormLength
|
||||||
#include "unicharset.h"
|
#include "ocrfeatures.h" // for FEATURE_STRUCT, FreeFeatureSet, FEATURE
|
||||||
#include "werd.h"
|
#include "oldlist.h" // for push, delete_d
|
||||||
|
#include "outfeat.h" // for OutlineFeatDir, OutlineFeatLength
|
||||||
#include <algorithm>
|
#include "pageres.h" // for WERD_RES
|
||||||
#include <cassert>
|
#include "params.h" // for IntParam, BoolParam, DoubleParam, Str...
|
||||||
#include <cstdio>
|
#include "picofeat.h" // for PicoFeatDir, PicoFeatX, PicoFeatY
|
||||||
#include <cstring>
|
#include "protos.h" // for PROTO_STRUCT, FillABC, PROTO
|
||||||
#include <cstdlib>
|
#include "ratngs.h" // for BLOB_CHOICE_IT, BLOB_CHOICE_LIST, BLO...
|
||||||
#include <cmath>
|
#include "rect.h" // for TBOX
|
||||||
|
#include "scrollview.h" // for ScrollView, ScrollView::BROWN, Scroll...
|
||||||
|
#include "seam.h" // for SEAM
|
||||||
|
#include "serialis.h" // for TFile
|
||||||
|
#include "shapeclassifier.h" // for ShapeClassifier
|
||||||
|
#include "shapetable.h" // for UnicharRating, ShapeTable, Shape, Uni...
|
||||||
|
#include "strngs.h" // for STRING
|
||||||
|
#include "tessclassifier.h" // for TessClassifier
|
||||||
|
#include "tessdatamanager.h" // for TessdataManager, TESSDATA_INTTEMP
|
||||||
|
#include "tprintf.h" // for tprintf
|
||||||
|
#include "trainingsample.h" // for TrainingSample
|
||||||
|
#include "unichar.h" // for UNICHAR_ID, INVALID_UNICHAR_ID
|
||||||
|
#include "unicharset.h" // for UNICHARSET, CHAR_FRAGMENT, UNICHAR_SPACE
|
||||||
|
#include "unicity_table.h" // for UnicityTable
|
||||||
|
|
||||||
#define ADAPT_TEMPLATE_SUFFIX ".a"
|
#define ADAPT_TEMPLATE_SUFFIX ".a"
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "include_gunit.h"
|
#include "include_gunit.h"
|
||||||
#include "intsimdmatrixavx2.h"
|
#include "intsimdmatrixavx2.h"
|
||||||
#include "intsimdmatrixsse.h"
|
#include "intsimdmatrixsse.h"
|
||||||
|
#include "matrix.h"
|
||||||
#include "simddetect.h"
|
#include "simddetect.h"
|
||||||
#include "tprintf.h"
|
#include "tprintf.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user