mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-12 07:29:07 +08:00
Merge pull request #1699 from stweil/includes
Clean include files and remove memry.h from public API
This commit is contained in:
commit
12f45a5758
@ -358,7 +358,6 @@ install(FILES
|
||||
src/ccutil/genericvector.h
|
||||
src/ccutil/helpers.h
|
||||
src/ccutil/host.h
|
||||
src/ccutil/memry.h
|
||||
src/ccutil/params.h
|
||||
src/ccutil/ocrclass.h
|
||||
src/ccutil/platform.h
|
||||
|
@ -35,7 +35,6 @@ double DotProductAVX(const double* u, const double* v, int n) {
|
||||
#include <immintrin.h>
|
||||
#include <cstdint>
|
||||
#include "dotproductavx.h"
|
||||
#include "host.h"
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -41,7 +41,6 @@ int32_t IntDotProductSSE(const int8_t* u, const int8_t* v, int n) {
|
||||
#include <smmintrin.h>
|
||||
#include <cstdint>
|
||||
#include "dotproductsse.h"
|
||||
#include "host.h"
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -19,8 +19,6 @@
|
||||
#ifndef TESSERACT_ARCH_DOTPRODUCTSSE_H_
|
||||
#define TESSERACT_ARCH_DOTPRODUCTSSE_H_
|
||||
|
||||
#include "host.h"
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
// Computes and returns the dot product of the n-vectors u and v.
|
||||
|
@ -17,9 +17,11 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "intsimdmatrix.h"
|
||||
#include "intsimdmatrixavx2.h"
|
||||
#include "intsimdmatrixsse.h"
|
||||
#include "simddetect.h"
|
||||
#include "genericvector.h" // for GenericVector
|
||||
#include "intsimdmatrixavx2.h" // for IntSimdMatrixAVX2
|
||||
#include "intsimdmatrixsse.h" // for IntSimdMatrixSSE
|
||||
#include "matrix.h" // for GENERIC_2D_ARRAY
|
||||
#include "simddetect.h" // for SIMDDetect
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -21,8 +21,9 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include "genericvector.h"
|
||||
#include "matrix.h"
|
||||
|
||||
template <class T> class GENERIC_2D_ARRAY;
|
||||
template <typename T> class GenericVector;
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "simddetect.h"
|
||||
#include "tprintf.h"
|
||||
|
||||
#undef X86_BUILD
|
||||
#if defined(__x86_64__) || defined(__i386__) || defined(_WIN32)
|
||||
|
@ -21,11 +21,13 @@
|
||||
#ifndef TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H_
|
||||
#define TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H_
|
||||
|
||||
#include "platform.h"
|
||||
#include "pageiterator.h"
|
||||
#include "unichar.h"
|
||||
#include "pageiterator.h" // for PageIterator
|
||||
#include "platform.h" // for TESS_API
|
||||
#include "publictypes.h" // for PageIteratorLevel
|
||||
#include "unichar.h" // for StrongScriptDirection
|
||||
|
||||
class BLOB_CHOICE_IT;
|
||||
class PAGE_RES;
|
||||
class WERD_RES;
|
||||
|
||||
namespace tesseract {
|
||||
|
@ -19,10 +19,15 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "blamer.h"
|
||||
#include "blobs.h"
|
||||
#include "matrix.h"
|
||||
#include "normalis.h"
|
||||
#include "pageres.h"
|
||||
#include <math.h> // for abs
|
||||
#include <stdlib.h> // for abs
|
||||
#include "blobs.h" // for TPOINT, TWERD, TBLOB
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "matrix.h" // for MATRIX
|
||||
#include "normalis.h" // for DENORM
|
||||
#include "pageres.h" // for WERD_RES
|
||||
#include "tesscallback.h" // for TessResultCallback2
|
||||
#include "unicharset.h" // for UNICHARSET
|
||||
|
||||
// Names for each value of IncorrectResultReason enum. Keep in sync.
|
||||
const char kBlameCorrect[] = "corr";
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**********************************************************************
|
||||
* File: blobbox.cpp (Formerly blobnbox.c)
|
||||
* Description: Code for the textord blob class.
|
||||
* Author: Ray Smith
|
||||
* Created: Thu Jul 30 09:08:51 BST 1992
|
||||
* Author: Ray Smith
|
||||
* Created: Thu Jul 30 09:08:51 BST 1992
|
||||
*
|
||||
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -23,12 +23,17 @@
|
||||
#endif
|
||||
|
||||
#include "blobbox.h"
|
||||
#include "allheaders.h"
|
||||
#include "blobs.h"
|
||||
#include "helpers.h"
|
||||
#include "normalis.h"
|
||||
#include <stdint.h> // for INT32_MAX, INT16_MAX
|
||||
#include <algorithm> // for max, min
|
||||
#include "allheaders.h" // for pixGetHeight, pixGetPixel
|
||||
#include "blobs.h" // for TPOINT
|
||||
#include "coutln.h" // for C_OUTLINE_IT, C_OUTLINE, C_OUTLINE_LIST
|
||||
#include "environ.h" // for l_uint32
|
||||
#include "helpers.h" // for UpdateRange, IntCastRounded
|
||||
#include "host.h" // for NearlyEqual, TRUE
|
||||
#include "ipoints.h" // for operator+=, ICOORD::rotate
|
||||
|
||||
#include <algorithm>
|
||||
struct Pix;
|
||||
|
||||
#define PROJECTION_MARGIN 10 //arbitrary
|
||||
#define EXTERN
|
||||
|
@ -17,14 +17,20 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
#include "coutln.h"
|
||||
|
||||
#include "allheaders.h"
|
||||
#include "blobs.h"
|
||||
#include "normalis.h"
|
||||
#include <algorithm> // for max, min
|
||||
#include <cmath> // for abs
|
||||
#include <cstdlib> // for abs
|
||||
#include <cstring> // for memset, memcpy, memmove
|
||||
#include "allheaders.h" // for pixSetPixel, pixGetData, pixRasterop, pixGe...
|
||||
#include "arrayaccess.h" // for GET_DATA_BYTE
|
||||
#include "blobs.h" // for TPOINT
|
||||
#include "crakedge.h" // for CRACKEDGE
|
||||
#include "environ.h" // for l_uint32
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "helpers.h" // for ClipToRange, IntCastRounded, Modulo
|
||||
#include "normalis.h" // for DENORM
|
||||
#include "pix.h" // for Pix (ptr only), PIX_DST, PIX_NOT
|
||||
|
||||
// Include automatically generated configuration file if running autoconf.
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -17,17 +17,24 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef COUTLN_H
|
||||
#define COUTLN_H
|
||||
#ifndef COUTLN_H
|
||||
#define COUTLN_H
|
||||
|
||||
#include "crakedge.h"
|
||||
#include "mod128.h"
|
||||
#include "bits16.h"
|
||||
#include "rect.h"
|
||||
#include "blckerr.h"
|
||||
#include "scrollview.h"
|
||||
#include <cstdint> // for int16_t, int32_t
|
||||
#include "bits16.h" // for BITS16
|
||||
#include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK
|
||||
#include "ipoints.h" // for operator+=
|
||||
#include "memry.h" // for free_mem
|
||||
#include "mod128.h" // for DIR128, DIRBITS
|
||||
#include "platform.h" // for DLLSYM
|
||||
#include "points.h" // for ICOORD, FCOORD
|
||||
#include "rect.h" // for TBOX
|
||||
#include "scrollview.h" // for ScrollView, ScrollView::Color
|
||||
|
||||
class CRACKEDGE;
|
||||
class C_OUTLINE;
|
||||
class DENORM;
|
||||
struct Pix;
|
||||
|
||||
#define INTERSECTING INT16_MAX//no winding number
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef TESSERACT_CCSTRUCT_DPPOINT_H_
|
||||
#define TESSERACT_CCSTRUCT_DPPOINT_H_
|
||||
|
||||
#include "host.h"
|
||||
#include <cstdint>
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -21,17 +21,16 @@
|
||||
#ifndef TESSERACT_CCSTRUCT_FONTINFO_H_
|
||||
#define TESSERACT_CCSTRUCT_FONTINFO_H_
|
||||
|
||||
#include <cstdint> // for uint16_t, uint32_t
|
||||
#include <cstdio> // for FILE
|
||||
#include "errcode.h"
|
||||
#include "genericvector.h"
|
||||
#include "host.h"
|
||||
#include "unichar.h"
|
||||
|
||||
template <typename T> class UnicityTable;
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
class BitVector;
|
||||
|
||||
// Simple struct to hold a font and a score. The scores come from the low-level
|
||||
// integer matcher, so they are in the uint16_t range. Fonts are an index to
|
||||
// fontinfo_table.
|
||||
|
@ -30,11 +30,14 @@
|
||||
#include <thread>
|
||||
#endif
|
||||
|
||||
#include "allheaders.h"
|
||||
#include "boxread.h"
|
||||
#include "callcpp.h"
|
||||
#include "helpers.h"
|
||||
#include "tprintf.h"
|
||||
#include "allheaders.h" // for pixDestroy, pixGetHeight, pixGetWidth, lept_...
|
||||
#include "boxread.h" // for ReadMemBoxes
|
||||
#include "callcpp.h" // for window_wait
|
||||
#include "helpers.h" // for IntCastRounded, TRand, ClipToRange, Modulo
|
||||
#include "rect.h" // for TBOX
|
||||
#include "scrollview.h" // for ScrollView, ScrollView::CYAN, ScrollView::NONE
|
||||
#include "serialis.h" // for TFile
|
||||
#include "tprintf.h" // for tprintf
|
||||
|
||||
// Number of documents to read ahead while training. Doesn't need to be very
|
||||
// large.
|
||||
|
@ -20,17 +20,19 @@
|
||||
#ifndef TESSERACT_IMAGE_IMAGEDATA_H_
|
||||
#define TESSERACT_IMAGE_IMAGEDATA_H_
|
||||
|
||||
#include "genericvector.h" // for GenericVector, PointerVector, FileReader
|
||||
#include "points.h" // for FCOORD
|
||||
#include "strngs.h" // for STRING
|
||||
#include "svutil.h" // for SVAutoLock, SVMutex
|
||||
|
||||
#include "genericvector.h"
|
||||
#include "normalis.h"
|
||||
#include "rect.h"
|
||||
#include "strngs.h"
|
||||
#include "svutil.h"
|
||||
|
||||
class ScrollView;
|
||||
class TBOX;
|
||||
struct Pix;
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
class TFile;
|
||||
|
||||
// Amount of padding to apply in output pixels in feature mode.
|
||||
const int kFeaturePadding = 2;
|
||||
// Number of pixels to pad around text boxes.
|
||||
@ -118,7 +120,7 @@ class ImageData {
|
||||
// Reads from the given file. Returns false in case of error.
|
||||
bool DeSerialize(TFile* fp);
|
||||
// As DeSerialize, but only seeks past the data - hence a static method.
|
||||
static bool SkipDeSerialize(tesseract::TFile* fp);
|
||||
static bool SkipDeSerialize(TFile* fp);
|
||||
|
||||
// Other accessors.
|
||||
const STRING& imagefilename() const {
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**********************************************************************
|
||||
* File: ipoints.h (Formerly icoords.h)
|
||||
* Description: Inline functions for coords.h.
|
||||
* Author: Ray Smith
|
||||
* Created: Fri Jun 21 15:14:21 BST 1991
|
||||
* Author: Ray Smith
|
||||
* Created: Fri Jun 21 15:14:21 BST 1991
|
||||
*
|
||||
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -17,10 +17,11 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef IPOINTS_H
|
||||
#define IPOINTS_H
|
||||
#ifndef IPOINTS_H
|
||||
#define IPOINTS_H
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "points.h" // ICOORD
|
||||
|
||||
/**********************************************************************
|
||||
* operator!
|
||||
|
@ -22,11 +22,26 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cassert>
|
||||
#include "blamer.h"
|
||||
#include "pageres.h"
|
||||
#include "blobs.h"
|
||||
#include <cassert> // for assert
|
||||
#include <cstdint> // for INT32_MAX
|
||||
#include <cstring> // for strlen
|
||||
#include "blamer.h" // for BlamerBundle
|
||||
#include "blobs.h" // for TWERD, TBLOB
|
||||
#include "boxword.h" // for BoxWord
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "host.h" // for TRUE, FALSE
|
||||
#include "ocrblock.h" // for BLOCK_IT, BLOCK, BLOCK_LIST (ptr only)
|
||||
#include "ocrrow.h" // for ROW, ROW_IT
|
||||
#include "pdblock.h" // for PDBLK
|
||||
#include "polyblk.h" // for POLY_BLOCK
|
||||
#include "publictypes.h" // for OcrEngineMode, OEM_LSTM_ONLY
|
||||
#include "seam.h" // for SEAM, start_seam_list
|
||||
#include "stepblob.h" // for C_BLOB_IT, C_BLOB, C_BLOB_LIST
|
||||
#include "tesscallback.h" // for NewPermanentTessCallback, TessResultCallback2
|
||||
#include "tprintf.h" // for tprintf
|
||||
|
||||
struct Pix;
|
||||
|
||||
ELISTIZE (BLOCK_RES)
|
||||
CLISTIZE (BLOCK_RES) ELISTIZE (ROW_RES) ELISTIZE (WERD_RES)
|
||||
|
@ -17,13 +17,22 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#define FASTEDGELENGTH 256
|
||||
#include "polyaprx.h"
|
||||
#include "params.h"
|
||||
#include "tprintf.h"
|
||||
#include <cstdint> // for INT16_MAX, int8_t
|
||||
#include "blobs.h" // for EDGEPT, TPOINT, VECTOR, TESSLINE
|
||||
#include "coutln.h" // for C_OUTLINE
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "host.h" // for FALSE, TRUE
|
||||
#include "ipoints.h" // for operator+=, operator*=
|
||||
#include "mod128.h" // for DIR128
|
||||
#include "params.h" // for BoolParam, BOOL_VAR
|
||||
#include "points.h" // for ICOORD
|
||||
#include "rect.h" // for TBOX
|
||||
#include "tprintf.h" // for tprintf
|
||||
#include "vecfuncs.h" // for LENGTH, point_diff, CROSS
|
||||
|
||||
#define EXTERN
|
||||
#define FASTEDGELENGTH 256
|
||||
|
||||
EXTERN BOOL_VAR(poly_debug, FALSE, "Debug old poly");
|
||||
EXTERN BOOL_VAR(poly_wide_objects_better, TRUE,
|
||||
|
@ -12,14 +12,14 @@ AM_CPPFLAGS += -DTESS_EXPORTS
|
||||
endif
|
||||
|
||||
pkginclude_HEADERS = \
|
||||
genericvector.h helpers.h host.h memry.h \
|
||||
genericvector.h helpers.h host.h \
|
||||
ocrclass.h platform.h serialis.h strngs.h \
|
||||
tesscallback.h unichar.h
|
||||
|
||||
noinst_HEADERS = \
|
||||
ambigs.h basedir.h bits16.h bitvector.h ccutil.h clst.h doubleptr.h elst2.h \
|
||||
elst.h errcode.h fileerr.h genericheap.h globaloc.h \
|
||||
indexmapbidi.h kdpair.h lsterr.h \
|
||||
indexmapbidi.h kdpair.h lsterr.h memry.h \
|
||||
nwmain.h object_cache.h params.h qrsequence.h sorthelper.h stderr.h \
|
||||
scanutils.h tessdatamanager.h tprintf.h \
|
||||
unicharcompress.h unicharmap.h unicharset.h unicity_table.h unicodes.h \
|
||||
|
@ -17,11 +17,10 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef MEMRY_H
|
||||
#define MEMRY_H
|
||||
#ifndef MEMRY_H
|
||||
#define MEMRY_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "host.h"
|
||||
#include <cstdint>
|
||||
|
||||
// allocate string
|
||||
extern char *alloc_string(int32_t count);
|
||||
|
@ -18,14 +18,12 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "strngs.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "errcode.h"
|
||||
#include "genericvector.h"
|
||||
#include "helpers.h"
|
||||
#include "serialis.h"
|
||||
#include "tprintf.h"
|
||||
#include <cassert> // for assert
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "genericvector.h" // for GenericVector
|
||||
#include "helpers.h" // for ReverseN
|
||||
#include "memry.h" // for alloc_string, free_string
|
||||
#include "serialis.h" // for TFile
|
||||
|
||||
using tesseract::TFile;
|
||||
|
||||
|
@ -17,14 +17,14 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef STRNGS_H
|
||||
#define STRNGS_H
|
||||
#ifndef STRNGS_H
|
||||
#define STRNGS_H
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include "memry.h"
|
||||
#include "platform.h"
|
||||
#include <cassert> // for assert
|
||||
#include <cstdint> // for uint32_t
|
||||
#include <cstdio> // for FILE
|
||||
#include <cstring> // for strncpy
|
||||
#include "platform.h" // for TESS_API
|
||||
|
||||
namespace tesseract {
|
||||
class TFile;
|
||||
|
@ -22,18 +22,12 @@
|
||||
#include "config_auto.h"
|
||||
#endif
|
||||
|
||||
#include "errcode.h"
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include "memry.h"
|
||||
#include "scrollview.h"
|
||||
#include "params.h"
|
||||
#include "callcpp.h"
|
||||
#include "tprintf.h"
|
||||
#include "host.h"
|
||||
#include "unichar.h"
|
||||
|
||||
#include <memory>
|
||||
#include <cstdarg> // for va_end, va_list, va_start
|
||||
#include <cstdio> // for vsprintf
|
||||
#include <memory> // for unique_ptr
|
||||
#include "scrollview.h" // for ScrollView, SVEvent, SVET_ANY, SVET_INPUT
|
||||
#include "tprintf.h" // for tprintf
|
||||
|
||||
void
|
||||
cprintf ( //Trace printf
|
||||
|
Loading…
Reference in New Issue
Block a user