2
Copyright (c) 1993-2008, Cognitive Technologies
5
����������� ��������� ��������������� � ������������� ��� � ���� ��������� ����,
6
��� � � �������� �����, � ����������� ��� ���, ��� ���������� ��������� �������:
8
* ��� ��������� ��������������� ��������� ���� ������ ���������� ���������
9
���� ����������� �� ��������� �����, ���� ������ ������� � �����������
11
* ��� ��������� ��������������� ��������� ���� � ������������ �/��� �
12
������ ����������, ������������ ��� ���������������, ������ �����������
13
��������� ���� ���������� �� ��������� �����, ���� ������ ������� �
14
����������� ����� �� ��������.
15
* �� �������� Cognitive Technologies, �� ����� �� ����������� �� �����
16
���� ������������ � �������� �������� ��������� �/��� �����������
17
���������, ���������� �� ���� ��, ��� ���������������� �����������
20
��� ��������� ������������� ����������� ��������� ���� �/��� ������� ������ "���
21
��� ����" ��� ������-���� ���� ��������, ���������� ���� ��� ���������������,
22
������� �������� ������������ �������� � ����������� ��� ���������� ����, �� ��
23
������������� ���. �� �������� ��������� ���� � �� ���� ������ ����, �������
24
����� �������� �/��� �������� �������������� ���������, �� � ���� ������ ��
25
��Ѩ� ���������������, ������� ����� �����, ���������, ����������� ���
26
������������� ������, ��������� � �������������� ��� ���������� ����������
27
������������� ������������� ��������� (������� ������ ������, ��� ������,
28
������� ���������, ��� ������ �/��� ������ �������, ���������� ��-�� ��������
29
������� ��� �/��� ������ ��������� �������� ��������� � ������� �����������,
30
�� �� ������������� ����� ��������), �� �� ������������� ���, ���� ���� �����
31
�������� ��� ������ ���� ���� �������� � ����������� ����� ������� � ������.
33
Redistribution and use in source and binary forms, with or without modification,
34
are permitted provided that the following conditions are met:
36
* Redistributions of source code must retain the above copyright notice,
37
this list of conditions and the following disclaimer.
38
* Redistributions in binary form must reproduce the above copyright notice,
39
this list of conditions and the following disclaimer in the documentation
40
and/or other materials provided with the distribution.
41
* Neither the name of the Cognitive Technologies nor the names of its
42
contributors may be used to endorse or promote products derived from this
43
software without specific prior written permission.
45
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
46
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
47
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
48
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
49
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
51
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
52
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
53
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
57
/********** ��������� *******************************************************/
58
/* ����� : ��������� �������� */
61
/* ������ : ������� �������� */
62
/* �������� : 08.06.00 */
63
/* ���� : 'RSTUFF.H' */
64
/* ���������� : ��������� ���������� */
66
/*----------------------------------------------------------------------------*/
67
//Almi 16.06.00 //Last edit ........
80
#define RSTUFF_FUNC FUN_EXPO
82
#define RSTUFF_FUNC FUN_IMPO
95
///////////////////////////////////////////////////////////////////////////////////////////
97
typedef struct tagRSPreProcessImage
106
Handle hDebugCancelSearchPictures;
107
Handle hDebugCancelComponent;
108
Handle hDebugCancelTurn;
109
Handle hDebugCancelSearchLines;
110
Handle hDebugCancelVerifyLines;
111
Handle hDebugCancelSearchDotLines;
112
Handle hDebugCancelRemoveLines;
113
Handle hDebugCancelSearchTables;
114
Handle hDebugCancelAutoTemplate;
115
Handle hDebugEnableSearchSegment;
116
const char ** pglpRecogName;
121
PBool32 pgneed_clean_line;
122
PInt32 pgnNumberTables;
125
Rect32 gRectTemplate;
126
FNPUMA_XSetTemplate fnXSetTemplate;
127
FNPUMA_XGetTemplate fnXGetTemplate;
128
char *szLayoutFileName;
129
} RSPreProcessImage, *PRSPreProcessImage;
130
///////////////////////////////////////////////////////////////////////////////////////////
132
typedef struct tagRSCBProgressPoints
134
void * pProgressStart;
135
void * pProgressStep;
136
void * pProgressStepLines;
137
void * pProgressStepTables;
138
void * pProgressFinish;
140
void * pStorePRGTIME;
141
void * pRestorePRGTIME;
143
void * prexcProgressStep;
144
void * pDPumaSkipComponent;
145
void * pDPumaSkipTurn;
146
void * pSetReturnCode;
147
void * pGetModulePath;
149
} RSCBProgressPoints, *PRSCBProgressPoints;
150
///////////////////////////////////////////////////////////////////////////////////////////
151
RSTUFF_FUNC(Bool32) RSTUFF_Init(Word16 wHeightCode,Handle hStorage);
152
RSTUFF_FUNC(Bool32) RSTUFF_Done();
153
RSTUFF_FUNC(Word32) RSTUFF_GetReturnCode();
154
RSTUFF_FUNC(Int8 *) RSTUFF_GetReturnString(Word32 dwError);
155
RSTUFF_FUNC(Bool32) RSTUFF_GetExportData(Word32 dwType, void * pData);
156
RSTUFF_FUNC(Bool32) RSTUFF_SetImportData(Word32 dwType, void * pData);
157
/////////////////////////////////////////////////////////////
161
RSTUFF_FN_RSBinarise = 1,
162
RSTUFF_FN_RSNormalise,
164
RSTUFF_FN_RSSetSpecPrj
165
} RSTUFF_EXPORT_ENTRIES;
166
//////////////////////////////////////////////////////////////////////////////////////////////
167
//typedef void (*PRSTUFFCBPRogressStart)(void);
168
//typedef Bool32 (*PRSTUFFCBPRogressStep)(Word32);
169
//typedef void (*PRSTUFFCBPRogressFinish)(void);
170
//////////////////////////////////////////////////////////////////////////////////////////////
173
RSTUFF_FN_SetProgresspoints = 128,
174
RSTUFF_FN_SetProgressStart,
175
RSTUFF_FN_SetProgressStep,
176
RSTUFF_FN_SetProgressFinish,
177
RSTUFF_FN_SetInitPRGTIME,
178
RSTUFF_FN_SetDPumaSkipComponent
179
} RSTUFF_IMPORT_ENTRIES;
180
////////////////////////////////////////////////////////////////////////////////////////////////
181
/* �������� ������� */
182
#define DEC_FUN(a,b,c) typedef a (*FNRSTUFF##b)c; RSTUFF_FUNC(a) RSTUFF_##b c
183
DEC_FUN(Bool32, RSBinarise, (void));
184
DEC_FUN(Bool32, RSNormalise, (PRSPreProcessImage,void* vBuff,int Size,void* vWork,int SizeWork));
185
DEC_FUN(Bool32, RSNormVerify, (PRSPreProcessImage));
186
DEC_FUN(Bool32, RSNormRemoveLines, (PRSPreProcessImage));
187
DEC_FUN(Bool32, RSLayout, (PRSPreProcessImage));
188
DEC_FUN(Bool32, RSSetSpecPrj, (Word8 NoSpecPrj));