00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef _GOCR_INTERNAL_H
00023
#define _GOCR_INTERNAL_H
00024
00025
00026
00027
#include <stdio.h>
00028
#include <stdlib.h>
00029
#include "config.h"
00030
#include "gocr_module.h"
00031
00032
00033
00034
00035
#define _gocr_debug(level, command) if ( level <= _data.verbose ) { command }
00036
extern void _gocr_printf (
int level,
char *function,
char *format, ... );
00037
00038
00039
00040
00041
struct _gocr_data {
00042
int verbose;
00043
int block_overlap;
00044
int no_block;
00045
int char_overlap;
00046
int char_rectangles;
00047
int find_all;
00048 FILE *error;
00049
int print;
00050
int print_image;
00051
00052
00053
int lock;
00054 };
00055
typedef struct _gocr_data _gocr_Data;
00056
00057
extern _gocr_Data _data;
00058
extern gocr_Block *currentblock;
00059
extern gocr_Box *currentbox;
00060
00061
00062
00063
00064
00065
extern int _gocr_initModule (
void );
00066
extern void _gocr_endModule (
void );
00067
00068
extern int _gocr_initBlock (
void );
00069
extern void _gocr_endBlock (
void );
00070
00071
extern int _gocr_initImage (
void );
00072
extern void _gocr_endImage (
void );
00073
00074
extern int _gocr_initUnicode (
void );
00075
extern void _gocr_endUnicode (
void );
00076
00077
00078
00079
00080
extern int _gocr_imageSharedCopy (
gocr_Image *orig,
int x0,
int y0,
int x1,
int y1,
00081
gocr_Image *
new );
00082
extern int _gocr_imageCopy (
gocr_Image *orig,
int x0,
int y0,
int x1,
int y1,
00083
gocr_Image *
new );
00084
extern void _gocr_fixParameters (
int *x0,
int *x1,
int *y0,
int *y1 );
00085
00086
extern int _gocr_blockTextFill (
gocr_Block *b );
00087
extern void _gocr_blockInfoFill (
gocr_Block *b );
00088
00089
extern int otsu (
gocr_Image *image,
void *v );
00090
#endif