~ubuntu-branches/ubuntu/trusty/cuneiform/trusty

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/hhh/rreccom.h

  • Committer: Bazaar Package Importer
  • Author(s): Jakub Wilk, c-assert.diff, slovenian-slv.diff
  • Date: 2011-01-26 21:53:07 UTC
  • mfrom: (5.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20110126215307-62x61mcesr607qb7
Tags: 1.0.0+dfsg-2
* Upload to unstable.
* Explicitly build-depend on pkg-config. Thanks to Stefano Rivera for the
  bug report.
* Add Vcs-* fields.
* Use the standard C assert() macro, rather than custom Cuneiform one.
  [c-assert.diff]
* Pass CFLAGS, CXXFLAGS and LDFLAGS (get from dpkg-buildflags) to cmake
  (closes: #608345). Thanks to Sami Liedes for the bug report.
  + Build depend on dpkg-dev (>= 1.15.7).
* Pass --parallel to dh.
  + Bump debhelper minimum version to 7.4.10.
* Update debian/copyright to the latest DEP-5 version.
* Bump year in debian/copyright.
* Explicitly link to GraphicsMagick (rather than via the ImageMagick
  compatibility layer).
* Don't ship /usr/lib/cuneiform/*.so symlinks. These libraries are
  considered private, at least until #598616 is fixed.
* Rename some private variables in debian/rules to make them lowercase.
* Update patch headers.
* Provide proper ‘build-arch’ and ‘build-indep’ targets in debian/rules.
* Document input format in the manual page (closes: #572061). Thanks to
  Janusz S. Bień for the bug report.
* Use ‘slv’ (rather than ‘slo’) as language code for Slovenian.
  [slovenian-slv.diff]
* Fix package description: Slovenian is supported, Slovak is not.
* Improve documentation of the language (-l) option (closes: #602512).
  Thanks to Jari Aalto for the bug report.
* Install reasons file for vrms.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
Copyright (c) 1993-2008, Cognitive Technologies
3
3
All rights reserved.
4
4
 
5
 
����������� ��������� ��������������� � ������������� ��� � ���� ��������� ����,
6
 
��� � � �������� �����, � ����������� ��� ���, ��� ���������� ��������� �������:
7
 
 
8
 
      * ��� ��������� ��������������� ��������� ���� ������ ���������� ���������
9
 
        ���� ����������� �� ��������� �����, ���� ������ ������� � �����������
10
 
        ����� �� ��������.
11
 
      * ��� ��������� ��������������� ��������� ���� � ������������ �/��� �
12
 
        ������ ����������, ������������ ��� ���������������, ������ �����������
13
 
        ��������� ���� ���������� �� ��������� �����, ���� ������ ������� �
14
 
        ����������� ����� �� ��������.
15
 
      * �� �������� Cognitive Technologies, �� ����� �� ����������� �� �����
16
 
        ���� ������������ � �������� �������� ��������� �/��� �����������
17
 
        ���������, ���������� �� ���� ��, ��� ���������������� �����������
18
 
        ����������.
19
 
 
20
 
��� ��������� ������������� ����������� ��������� ���� �/��� ������� ������ "���
21
 
��� ����" ��� ������-���� ���� ��������, ���������� ���� ��� ���������������,
22
 
������� �������� ������������ �������� � ����������� ��� ���������� ����, �� ��
23
 
������������� ���. �� �������� ��������� ���� � �� ���� ������ ����, �������
24
 
����� �������� �/��� �������� �������������� ���������, �� � ���� ������ ��
25
 
��Ѩ� ���������������, ������� ����� �����, ���������, ����������� ���
26
 
������������� ������, ��������� � �������������� ��� ���������� ����������
27
 
������������� ������������� ��������� (������� ������ ������, ��� ������,
28
 
������� ���������, ��� ������ �/��� ������ �������, ���������� ��-�� ��������
29
 
������� ��� �/��� ������ ��������� �������� ��������� � ������� �����������,
30
 
�� �� ������������� ����� ��������), �� �� ������������� ���, ���� ���� �����
31
 
�������� ��� ������ ���� ���� �������� � ����������� ����� ������� � ������.
 
5
Разрешается повторное распространение и использование как в виде исходного кода,
 
6
так и в двоичной форме, с изменениями или без, при соблюдении следующих условий:
 
7
 
 
8
      * При повторном распространении исходного кода должны оставаться указанное
 
9
        выше уведомление об авторском праве, этот список условий и последующий
 
10
        отказ от гарантий.
 
11
      * При повторном распространении двоичного кода в документации и/или в
 
12
        других материалах, поставляемых при распространении, должны сохраняться
 
13
        указанная выше информация об авторском праве, этот список условий и
 
14
        последующий отказ от гарантий.
 
15
      * Ни название Cognitive Technologies, ни имена ее сотрудников не могут
 
16
        быть использованы в качестве средства поддержки и/или продвижения
 
17
        продуктов, основанных на этом ПО, без предварительного письменного
 
18
        разрешения.
 
19
 
 
20
ЭТА ПРОГРАММА ПРЕДОСТАВЛЕНА ВЛАДЕЛЬЦАМИ АВТОРСКИХ ПРАВ И/ИЛИ ДРУГИМИ ЛИЦАМИ "КАК
 
21
ОНА ЕСТЬ" БЕЗ КАКОГО-ЛИБО ВИДА ГАРАНТИЙ, ВЫРАЖЕННЫХ ЯВНО ИЛИ ПОДРАЗУМЕВАЕМЫХ,
 
22
ВКЛЮЧАЯ ГАРАНТИИ КОММЕРЧЕСКОЙ ЦЕННОСТИ И ПРИГОДНОСТИ ДЛЯ КОНКРЕТНОЙ ЦЕЛИ, НО НЕ
 
23
ОГРАНИЧИВАЯСЬ ИМИ. НИ ВЛАДЕЛЕЦ АВТОРСКИХ ПРАВ И НИ ОДНО ДРУГОЕ ЛИЦО, КОТОРОЕ
 
24
МОЖЕТ ИЗМЕНЯТЬ И/ИЛИ ПОВТОРНО РАСПРОСТРАНЯТЬ ПРОГРАММУ, НИ В КОЕМ СЛУЧАЕ НЕ
 
25
НЕСЁТ ОТВЕТСТВЕННОСТИ, ВКЛЮЧАЯ ЛЮБЫЕ ОБЩИЕ, СЛУЧАЙНЫЕ, СПЕЦИАЛЬНЫЕ ИЛИ
 
26
ПОСЛЕДОВАВШИЕ УБЫТКИ, СВЯЗАННЫЕ С ИСПОЛЬЗОВАНИЕМ ИЛИ ПОНЕСЕННЫЕ ВСЛЕДСТВИЕ
 
27
НЕВОЗМОЖНОСТИ ИСПОЛЬЗОВАНИЯ ПРОГРАММЫ (ВКЛЮЧАЯ ПОТЕРИ ДАННЫХ, ИЛИ ДАННЫЕ,
 
28
СТАВШИЕ НЕГОДНЫМИ, ИЛИ УБЫТКИ И/ИЛИ ПОТЕРИ ДОХОДОВ, ПОНЕСЕННЫЕ ИЗ-ЗА ДЕЙСТВИЙ
 
29
ТРЕТЬИХ ЛИЦ И/ИЛИ ОТКАЗА ПРОГРАММЫ РАБОТАТЬ СОВМЕСТНО С ДРУГИМИ ПРОГРАММАМИ,
 
30
НО НЕ ОГРАНИЧИВАЯСЬ ЭТИМИ СЛУЧАЯМИ), НО НЕ ОГРАНИЧИВАЯСЬ ИМИ, ДАЖЕ ЕСЛИ ТАКОЙ
 
31
ВЛАДЕЛЕЦ ИЛИ ДРУГОЕ ЛИЦО БЫЛИ ИЗВЕЩЕНЫ О ВОЗМОЖНОСТИ ТАКИХ УБЫТКОВ И ПОТЕРЬ.
32
32
 
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:
102
102
#define ExRc_IncorrectParam     -20     // Compatible with Err16.h
103
103
#define ExRc_NotEnoughMemory    4
104
104
 
105
 
typedef Bool  (* Tiger_ProcComp)    (void * pool,Word32 size);
 
105
typedef Bool  (* Tiger_ProcComp)    (void * pool,uint32_t size);
106
106
*/
107
107
#ifndef Handle
108
108
typedef void * Handle ;
140
140
 
141
141
typedef struct tagRRecComControl
142
142
{
143
 
        Word32 flags;
144
 
#define RECOG_EVN 1 //��������� � ������� ������ "Event"
145
 
#define RECOG_GRA 2 //��������� � ������� ���������
 
143
        uint32_t flags;
 
144
#define RECOG_EVN 1 //опознание с помошью метода "Event"
 
145
#define RECOG_GRA 2 //опознание с помошью нейросети
146
146
 
147
 
   Word16 MaxCompWid;  // if comp width > MaxCompWid => ignored; 0 - not init
148
 
   Word16 MaxCompHei;  // =""= by height
149
 
   Word16 MinCompWid;  // if comp width <= MinCompWid => ignored; 0 - not init
150
 
   Word16 MinCompHei;  // =""= by width
151
 
   Word16 MaxScale;    // if scaling > => use long intervals
 
147
   uint16_t MaxCompWid;  // if comp width > MaxCompWid => ignored; 0 - not init
 
148
   uint16_t MaxCompHei;  // =""= by height
 
149
   uint16_t MinCompWid;  // if comp width <= MinCompWid => ignored; 0 - not init
 
150
   uint16_t MinCompHei;  // =""= by width
 
151
   uint16_t MaxScale;    // if scaling > => use long intervals
152
152
} RRecComControl;
153
153
 
154
154
//   RRECCOM_FUNC(Bool32) ExtrcompInit( void);
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);
165
165
 
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);
172
172
 
173
173
/*
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,
199
 
    Word8 *lpDIB,
200
 
    Int32 TemplCol, Int32 TemplRow, Int32 TemplWid, Int32 TemplHei);
 
199
    uchar *lpDIB,
 
200
    int32_t TemplCol, int32_t TemplRow, int32_t TemplWid, int32_t TemplHei);
201
201
RRECCOM_FUNC(Bool32)  RRECCOMExtraDIB(ExcControl ExCW,
202
 
    Word8 *lpDIB,
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 ���� ������ ����������
 
202
    uchar *lpDIB,
 
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 Дать версию библиотеки
211
211
//
212
212
//
213
213
*/
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);
217
217
/*
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);
221
221
 
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);
245
245
*/