2
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
�������� ��� ������ ���� ���� �������� � ����������� ����� ������� � ������.
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
33
Redistribution and use in source and binary forms, with or without modification,
34
34
are permitted provided that the following conditions are met:
156
156
// Can new call after closing the library without ExtrcompDone
157
157
// RRECCOM_FUNC(void) ExtrcompDone(void);
158
158
// Closing of the library.
159
RRECCOM_FUNC(Word32) RRECCOM_GetReturnCode(void);
160
RRECCOM_FUNC(char*) RRECCOM_GetReturnString(Word32 dwError);
161
RRECCOM_FUNC(Bool32) RRECCOM_Init(Word16 wHeightCode, Handle hStorage);
159
RRECCOM_FUNC(uint32_t) RRECCOM_GetReturnCode(void);
160
RRECCOM_FUNC(char*) RRECCOM_GetReturnString(uint32_t dwError);
161
RRECCOM_FUNC(Bool32) RRECCOM_Init(uint16_t wHeightCode, Handle hStorage);
162
162
RRECCOM_FUNC(Bool32) RRECCOM_Done(void);
163
RRECCOM_FUNC(Bool32) RRECCOM_GetExportData(Word32 dwType, void * pData);
164
RRECCOM_FUNC(Bool32) RRECCOM_SetImportData(Word32 dwType, void * pData);
163
RRECCOM_FUNC(Bool32) RRECCOM_GetExportData(uint32_t dwType, void * pData);
164
RRECCOM_FUNC(Bool32) RRECCOM_SetImportData(uint32_t dwType, const void * pData);
166
// 1 RRECCOM_FNRECOG �������� ����������
167
typedef Bool32 (*FNRRECCOM_Recog)(Handle hCCOM, RRecComControl Control, char *spath, Word8 lang);
168
RRECCOM_FUNC(Bool32) RRECCOM_Recog(Handle hCCOM, RRecComControl Control, char *spath, Word8 lang);
169
//2 RRECCOM_FNRECOGCOMP �������� ���� ����������
170
//typedef Bool32 (*FNRRECCOM_RecogComp)(RecRaster* comp_raster, RecVersions* comp_vers, Word8 lang, Bool32 need_align8 = false);
171
//RRECCOM_FUNC(Bool32) RRECCOM_RecogComp(RecRaster* comp_raster, RecVersions* comp_vers, Word8 lang, Bool32 need_align8 = false);
166
// 1 RRECCOM_FNRECOG опознать компоненты
167
typedef Bool32 (*FNRRECCOM_Recog)(Handle hCCOM, RRecComControl Control, char *spath, uchar lang);
168
RRECCOM_FUNC(Bool32) RRECCOM_Recog(Handle hCCOM, RRecComControl Control, char *spath, uchar lang);
169
//2 RRECCOM_FNRECOGCOMP опознать одну компоненту
170
//typedef Bool32 (*FNRRECCOM_RecogComp)(RecRaster* comp_raster, RecVersions* comp_vers, uchar lang, Bool32 need_align8 = false);
171
//RRECCOM_FUNC(Bool32) RRECCOM_RecogComp(RecRaster* comp_raster, RecVersions* comp_vers, uchar lang, Bool32 need_align8 = false);
174
// 1 RRECCOM_FNEVNPROPERT ���������� ����� ��� �����
174
// 1 RRECCOM_FNEVNPROPERT установить опции для эвент
175
175
// setup condition for recognition all comps without Event-algoriphm
176
176
// and alphabet (256 ANSI indicators for any letter)
177
typedef Bool32 (*FNRRECCOM_SetEVNProperties)(ExcControl ExCW,char *spath, Word8 lang);
178
RRECCOM_FUNC(Bool32) RRECCOM_SetEVNProperties(ExcControl ExCW,char *spath, Word8 lang);
179
// 2 RRECCOM_FNEXTRACOMP ����� ���������� � ������� ���������
177
typedef Bool32 (*FNRRECCOM_SetEVNProperties)(ExcControl ExCW,char *spath, uchar lang);
178
RRECCOM_FUNC(Bool32) RRECCOM_SetEVNProperties(ExcControl ExCW,char *spath, uchar lang);
179
// 2 RRECCOM_FNEXTRACOMP найти компоненты с помощью коллбэков
180
180
typedef Bool32 (*FNRRECCOM_Excomp)(ExcControl Control,
181
181
TImageOpen tio, TImageClose tic,
182
182
TImageRead tir, Tiger_ProcComp tipc);
183
RRECCOM_FUNC(Int32) Extracomp(ExcControl Control,
183
RRECCOM_FUNC(int32_t) Extracomp(ExcControl Control,
184
184
TImageOpen tio, TImageClose tic,
185
185
TImageRead tir, Tiger_ProcComp tipc);
186
// 3 RRECCOM_FNEXTRA ����� ���������� � ������
186
// 3 RRECCOM_FNEXTRA найти компоненты в растре
187
187
typedef Bool32 (*FNRRECCOM_Exc)(ExcControl Control,
188
Word8 *lpRaster, Int32 BWid, Bool32 ReverseOrder,
189
Int32 Wid, Int32 Hei,
190
Int32 HRes, Int32 VRes,
191
Int32 TemplCol, Int32 TemplRow, Int32 TemplWid, Int32 TemplHei);
188
uchar *lpRaster, int32_t BWid, Bool32 ReverseOrder,
189
int32_t Wid, int32_t Hei,
190
int32_t HRes, int32_t VRes,
191
int32_t TemplCol, int32_t TemplRow, int32_t TemplWid, int32_t TemplHei);
192
192
RRECCOM_FUNC(Bool32) RRECCOMExtra(ExcControl Control,
193
Word8 *lpRaster, Int32 BWid, Bool32 ReverseOrder,
194
Int32 Wid, Int32 Hei,
195
Int32 HRes, Int32 VRes,
196
Int32 TemplCol, Int32 TemplRow, Int32 TemplWid, Int32 TemplHei, Bool32 FotoMetr);
197
// 4 RRECCOM_FNEXTRADIB ����� ���������� � ����
193
uchar *lpRaster, int32_t BWid, Bool32 ReverseOrder,
194
int32_t Wid, int32_t Hei,
195
int32_t HRes, int32_t VRes,
196
int32_t TemplCol, int32_t TemplRow, int32_t TemplWid, int32_t TemplHei, Bool32 FotoMetr);
197
// 4 RRECCOM_FNEXTRADIB найти компоненты в ДИБе
198
198
typedef Bool32 (*FNRRECCOM_ExcDIB)(ExcControl ExCW,
200
Int32 TemplCol, Int32 TemplRow, Int32 TemplWid, Int32 TemplHei);
200
int32_t TemplCol, int32_t TemplRow, int32_t TemplWid, int32_t TemplHei);
201
201
RRECCOM_FUNC(Bool32) RRECCOMExtraDIB(ExcControl ExCW,
203
Int32 TemplCol, Int32 TemplRow, Int32 TemplWid, Int32 TemplHei);
204
// 5 RRECCOM_FNGETCONTAINER �������� ��� ���������� � ������������
205
typedef Int32 (*FNRRECCOM_GetContainer)(void);
206
RRECCOM_FUNC(Int32) RRECCOMGetContainer(void);
207
// 6 RRECCOM_FNGETLENEREP �������� ������������ �������������
208
typedef Bool32 (*FNRRECCOM_MakeLP)( RecRaster *rRaster , Word8 *lp, Int16 *lp_size, Int16 *numcomp);
209
RRECCOM_FUNC(Bool32) RRECCOMMakeLP ( RecRaster *rRaster , Word8 *lp, Int16 *lp_size, Int16 *numcomp);
210
// 7 RRECCOM_FNVERSION ���� ������ ����������
203
int32_t TemplCol, int32_t TemplRow, int32_t TemplWid, int32_t TemplHei);
204
// 5 RRECCOM_FNGETCONTAINER Получить код контейнера с компонентами
205
typedef int32_t (*FNRRECCOM_GetContainer)(void);
206
RRECCOM_FUNC(int32_t) RRECCOMGetContainer(void);
207
// 6 RRECCOM_FNGETLENEREP Получить интервальное представление
208
typedef Bool32 (*FNRRECCOM_MakeLP)( RecRaster *rRaster , uchar *lp, int16_t *lp_size, int16_t *numcomp);
209
RRECCOM_FUNC(Bool32) RRECCOMMakeLP ( RecRaster *rRaster , uchar *lp, int16_t *lp_size, int16_t *numcomp);
210
// 7 RRECCOM_FNVERSION Дать версию библиотеки
214
// 8 RRECCOM_FNREX_ISLANGUAGE ���������� �� ����
215
typedef Bool32 (*FNRRECCOM_IsLanguage)(Word8 language);
216
RRECCOM_FUNC(Bool32) RRECCOM_IsLanguage(Word8 language);
214
// 8 RRECCOM_FNREX_ISLANGUAGE существует ли язык
215
typedef Bool32 (*FNRRECCOM_IsLanguage)(uchar language);
216
RRECCOM_FUNC(Bool32) RRECCOM_IsLanguage(uchar language);
218
// 9 RRECCOM_FNGETORIENT ���������� ��������
219
//typedef Bool32 (*FNRRECCOM_GetOrient)(Word8 *ori);
220
RRECCOM_FUNC(Bool32) RRECCOM_GetOrient(Word8 *ori, Handle hCCOM);
218
// 9 RRECCOM_FNGETORIENT ориентация страницы
219
//typedef Bool32 (*FNRRECCOM_GetOrient)(uchar *ori);
220
RRECCOM_FUNC(Bool32) RRECCOM_GetOrient(uchar *ori, Handle hCCOM);
222
// 10 RRECCOM_FNMN2CCOM �� MN � CCOM_comp
222
// 10 RRECCOM_FNMN2CCOM из MN в CCOM_comp
223
223
typedef CCOM_comp* (*FNRRECCOM_MN2CCOM)(Handle hCCOM,Handle hmn);
224
224
RRECCOM_FUNC(CCOM_comp*) RRECCOM_MN2CCOM(Handle hCCOM,Handle hmn);
225
// 11 RRECCOM_FNGETINVERTION ��������� �� ����� (����� �� ������)
226
typedef Bool32 (*FNRRECCOM_GetInvertion)(Word8 *inv);
227
RRECCOM_FUNC(Bool32) RRECCOM_GetInvertion(Word8 *inv);
225
// 11 RRECCOM_FNGETINVERTION инверсный ли образ (белое на чёрном)
226
typedef Bool32 (*FNRRECCOM_GetInvertion)(uchar *inv);
227
RRECCOM_FUNC(Bool32) RRECCOM_GetInvertion(uchar *inv);
228
228
typedef Bool32 (*FNRRECCOM_ProgressStart )(void);
229
typedef Bool32 (*FNRRECCOM_ProgressStep )(Word32 step);
229
typedef Bool32 (*FNRRECCOM_ProgressStep )(uint32_t step);
230
230
typedef Bool32 (*FNRRECCOM_ProgressFinish)(void);
231
// 12 RRECCOM_FNEVNALPHABET ��������� �������� ��� �����
232
typedef Bool32 (*FNRRECCOM_SetEVNAlphabet)(char *spath, Word8 lang);
233
RRECCOM_FUNC(Bool32) RRECCOM_SetEVNAlphabet(char *spath, Word8 lang);
234
// 13 RRECCOM_FNEXTRACOMP3CB 3 ��������
231
// 12 RRECCOM_FNEVNALPHABET установка алфавита для евент
232
typedef Bool32 (*FNRRECCOM_SetEVNAlphabet)(char *spath, uchar lang);
233
RRECCOM_FUNC(Bool32) RRECCOM_SetEVNAlphabet(char *spath, uchar lang);
234
// 13 RRECCOM_FNEXTRACOMP3CB 3 коллбэка
235
235
typedef Bool32 (*FNRRECCOMExtracomp3CB)(ExcControl ExCW,TImageOpen tio,
236
236
TImageClose tic, TImageRead tir);
237
237
RRECCOM_FUNC(Bool32) RRECCOMExtracomp3CB(ExcControl ExCW,TImageOpen tio,
238
238
TImageClose tic, TImageRead tir);
239
// 14 RRECCOM_FNEXTGETRECRASTERORIENT ���������� �������� ������
240
typedef Bool32 (*FNexc_get_rec_raster_orient)(RecRaster *rs,Int32 *res);
241
RRECCOM_FUNC(Bool32) exc_get_rec_raster_orient(RecRaster *rs,Int32 *res);
242
// 15 RRECCOM_FNSETALLALPHAGRA ������� ��������� ����
239
// 14 RRECCOM_FNEXTGETRECRASTERORIENT ориентация рабочего растра
240
typedef Bool32 (*FNexc_get_rec_raster_orient)(RecRaster *rs,int32_t *res);
241
RRECCOM_FUNC(Bool32) exc_get_rec_raster_orient(RecRaster *rs,int32_t *res);
242
// 15 RRECCOM_FNSETALLALPHAGRA алфавит нейронной сети
243
243
typedef Bool32 (*FNexc_set_all_alphabet_gra)(void);
244
244
RRECCOM_FUNC(Bool32) exc_set_all_alphabet_gra(void);