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.
70
#define R35_FUNC FUN_EXPO
72
#define R35_FUNC FUN_IMPO
79
R35_FUNC(Bool32) R35InitNDX( MemFunc* mem);
80
R35_FUNC(Bool32) R35InitHND( MemFunc* mem);
81
R35_FUNC(Bool32) R35InitPRN( MemFunc* mem);
82
R35_FUNC(Bool32) R35Init( MemFunc* mem);
83
// Start Initialization; TRUE - OK
84
// for mem==NULL need used internal memory functions from DLL
85
// New call - after close library without R35Done
87
R35_FUNC(Bool32) R35SetAlphabet(
88
char* char_tbl_put_to ); // char table[0-255]
89
// Set alphabet for recognition
91
R35_FUNC(Bool32) R35Binarize(RecRaster *rRaster,
92
Word16 *CompImage,Int32 dx, Int32 dy);
93
R35_FUNC(Bool32) R35Binarize8(RecRaster *rRaster,
94
Word8 *CompImage,Int32 dx, Int32 dy);
96
R35_FUNC(void) R35SetPlatform( Int32 cpu );
97
R35_FUNC(Bool32) R35Pack(
98
RecRaster* raster, // raster description
100
Int32 TO_X, Int32 TO_Y); // result
102
R35_FUNC(Bool32) R35PackProport(
103
RecRaster* raster, // raster description
105
Int32 TO_X, Int32 TO_Y); // result
107
R35_FUNC(Bool32) R35PackProportHor16(
109
Word16 *Image3x5, Int32 *to_x, Int32 *to_y);
111
R35_FUNC(Bool32) R35RecogCharIm3x5(
112
Word16* Im3x5, // image 3x5
113
RecVersions* R35res );
115
R35_FUNC(Bool32) R35RecogCharIm3x5_expert(
116
Word16* Im3x5, // image 3x5
117
RecVersions* R35res );
120
R35_FUNC(Bool32) R35RecogPrintCharIm3x5(
121
Word16* Im3x5, // image 3x5
122
RecVersions* R35res );
124
R35_FUNC(Bool32) R35RecogPrintCharIm3x5_expert(
125
Word16* Im3x5, // image 3x5
126
RecVersions* R35res, Bool32 r5x3 );
128
R35_FUNC(Bool32) R35RecogNdxIm3x5(
129
Word16* Im3x5, // image 3x5
130
RecVersions* R35res );
132
R35_FUNC(Bool32) R35RecogNdxIm3x5_expert(
133
Word16* Im3x5, // image 3x5
134
RecVersions* R35res );
136
R35_FUNC(void) R35Done(void);
137
// Stop function. Call after R35Init()
139
R35_FUNC(Int16) R35GetErr(void);
140
// Err16.h defined codes or one of the next
141
R35_FUNC(Bool32) R35Init_learn( Int32 num, Word8 level, Int32 FontType );
142
R35_FUNC(void) R35Done_learn( Int32 FontType);
143
R35_FUNC(Bool32) R35RecogCharIm3x5_learn(
144
Word8 Code,Word16* Im3x5/*, Bool32 r5x3*/, Int32 FontType );
145
R35_FUNC(Bool32) R35RecogCharIm3x5_learn_expert(
146
Word8 Code,Word16* Im3x5) ;
147
R35_FUNC(Bool32) R35Delete(Word8 let, Int32 num_del);
148
R35_FUNC(Bool32) R35Add(Word8 let,Word16* Im3x5, Int32 FontType);
149
R35_FUNC(void) R35SetMTR(int fnt) ;
152
#define ER_R35_NO_ERROR 0
153
#define ER_R35_NO_RECOG 1
154
#define ER_R35_TOO_SMALL 2
155
#define ER_R35_OPEN 3
156
#define ER_R35_READ 4
157
#define ER_R35_MEMORY 5
158
#define ER_R35_NO_LOAD 6
159
#define ER_R35_NO_LEVEL 7
160
#define ER_R35_ALPHA 8
161
#define ER_R35_WRITE 9