tesseract  4.0.0-1-g2a2b
rejctmap.h File Reference
#include <memory>
#include "bits16.h"
#include "errcode.h"
#include "params.h"

Go to the source code of this file.

Classes

class  REJ
 
class  REJMAP
 

Macros

#define MAP_ACCEPT   '1'
 
#define MAP_REJECT_PERM   '0'
 
#define MAP_REJECT_TEMP   '2'
 
#define MAP_REJECT_POTENTIAL   '3'
 

Enumerations

enum  REJ_FLAGS {
  R_TESS_FAILURE, R_SMALL_XHT, R_EDGE_CHAR, R_1IL_CONFLICT,
  R_POSTNN_1IL, R_REJ_CBLOB, R_MM_REJECT, R_BAD_REPETITION,
  R_POOR_MATCH, R_NOT_TESS_ACCEPTED, R_CONTAINS_BLANKS, R_BAD_PERMUTER,
  R_HYPHEN, R_DUBIOUS, R_NO_ALPHANUMS, R_MOSTLY_REJ,
  R_XHT_FIXUP, R_BAD_QUALITY, R_DOC_REJ, R_BLOCK_REJ,
  R_ROW_REJ, R_UNLV_REJ, R_NN_ACCEPT, R_HYPHEN_ACCEPT,
  R_MM_ACCEPT, R_QUALITY_ACCEPT, R_MINIMAL_REJ_ACCEPT
}
 

Macro Definition Documentation

◆ MAP_ACCEPT

#define MAP_ACCEPT   '1'

Definition at line 92 of file rejctmap.h.

◆ MAP_REJECT_PERM

#define MAP_REJECT_PERM   '0'

Definition at line 93 of file rejctmap.h.

◆ MAP_REJECT_POTENTIAL

#define MAP_REJECT_POTENTIAL   '3'

Definition at line 95 of file rejctmap.h.

◆ MAP_REJECT_TEMP

#define MAP_REJECT_TEMP   '2'

Definition at line 94 of file rejctmap.h.

Enumeration Type Documentation

◆ REJ_FLAGS

enum REJ_FLAGS
Enumerator
R_TESS_FAILURE 
R_SMALL_XHT 
R_EDGE_CHAR 
R_1IL_CONFLICT 
R_POSTNN_1IL 
R_REJ_CBLOB 
R_MM_REJECT 
R_BAD_REPETITION 
R_POOR_MATCH 
R_NOT_TESS_ACCEPTED 
R_CONTAINS_BLANKS 
R_BAD_PERMUTER 
R_HYPHEN 
R_DUBIOUS 
R_NO_ALPHANUMS 
R_MOSTLY_REJ 
R_XHT_FIXUP 
R_BAD_QUALITY 
R_DOC_REJ 
R_BLOCK_REJ 
R_ROW_REJ 
R_UNLV_REJ 
R_NN_ACCEPT 
R_HYPHEN_ACCEPT 
R_MM_ACCEPT 
R_QUALITY_ACCEPT 
R_MINIMAL_REJ_ACCEPT 

Definition at line 49 of file rejctmap.h.

49  {
50  /* Reject modes which are NEVER overridden */
51  R_TESS_FAILURE, // PERM Tess didn't classify
52  R_SMALL_XHT, // PERM Xht too small
53  R_EDGE_CHAR, // PERM Too close to edge of image
54  R_1IL_CONFLICT, // PERM 1Il confusion
55  R_POSTNN_1IL, // PERM 1Il unrejected by NN
56  R_REJ_CBLOB, // PERM Odd blob
57  R_MM_REJECT, // PERM Matrix match rejection (m's)
58  R_BAD_REPETITION, // TEMP Repeated char which doesn't match trend
59 
60  /* Initial reject modes (pre NN_ACCEPT) */
61  R_POOR_MATCH, // TEMP Ray's original heuristic (Not used)
62  R_NOT_TESS_ACCEPTED, // TEMP Tess didn't accept WERD
63  R_CONTAINS_BLANKS, // TEMP Tess failed on other chs in WERD
64  R_BAD_PERMUTER, // POTENTIAL Bad permuter for WERD
65 
66  /* Reject modes generated after NN_ACCEPT but before MM_ACCEPT */
67  R_HYPHEN, // TEMP Post NN dodgy hyphen or full stop
68  R_DUBIOUS, // TEMP Post NN dodgy chars
69  R_NO_ALPHANUMS, // TEMP No alphanumerics in word after NN
70  R_MOSTLY_REJ, // TEMP Most of word rejected so rej the rest
71  R_XHT_FIXUP, // TEMP Xht tests unsure
72 
73  /* Reject modes generated after MM_ACCEPT but before QUALITY_ACCEPT */
74  R_BAD_QUALITY, // TEMP Quality metrics bad for WERD
75 
76  /* Reject modes generated after QUALITY_ACCEPT but before MINIMAL_REJ accep*/
77  R_DOC_REJ, // TEMP Document rejection
78  R_BLOCK_REJ, // TEMP Block rejection
79  R_ROW_REJ, // TEMP Row rejection
80  R_UNLV_REJ, // TEMP ~ turned to - or ^ turned to space
81 
82  /* Accept modes which occur between the above rejection groups */
83  R_NN_ACCEPT, // NN acceptance
84  R_HYPHEN_ACCEPT, // Hyphen acceptance
85  R_MM_ACCEPT, // Matrix match acceptance
86  R_QUALITY_ACCEPT, // Accept word in good quality doc
87  R_MINIMAL_REJ_ACCEPT // Accept EVERYTHING except tess failures
88 };