~ubuntu-branches/debian/wheezy/cuneiform/wheezy

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/hrk/r35.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-07-10 17:58:10 UTC
  • Revision ID: james.westby@ubuntu.com-20090710175810-rqc89d2i3tki9m89
Tags: upstream-0.7.0+dfsg
Import upstream version 0.7.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (c) 1993-2008, Cognitive Technologies
 
3
All rights reserved.
 
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
�������� ��� ������ ���� ���� �������� � ����������� ����� ������� � ������.
 
32
 
 
33
Redistribution and use in source and binary forms, with or without modification,
 
34
are permitted provided that the following conditions are met:
 
35
 
 
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.
 
44
 
 
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.
 
55
*/
 
56
 
 
57
#ifndef __R35_H
 
58
   #define __R35_H
 
59
 
 
60
   #ifndef __GLOBUS_H
 
61
   #include "globus.h"
 
62
   #endif
 
63
   #include "r35defs.h"
 
64
#ifndef __RECDEFS_H
 
65
   #include "recdefs.h"
 
66
#endif
 
67
   #include "memfunc.h"
 
68
 
 
69
   #ifdef __R35__
 
70
      #define R35_FUNC  FUN_EXPO
 
71
   #else
 
72
      #define R35_FUNC  FUN_IMPO
 
73
   #endif
 
74
 
 
75
   #ifdef __cplusplus
 
76
   extern "C" {
 
77
   #endif
 
78
 
 
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
 
86
 
 
87
   R35_FUNC(Bool32)  R35SetAlphabet(
 
88
        char*     char_tbl_put_to ); // char table[0-255]
 
89
      // Set alphabet for recognition
 
90
 
 
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);
 
95
 
 
96
   R35_FUNC(void)  R35SetPlatform( Int32 cpu );
 
97
   R35_FUNC(Bool32)   R35Pack(
 
98
       RecRaster*  raster,          // raster description
 
99
       Word16*  Image3x5,
 
100
       Int32 TO_X, Int32 TO_Y);       // result
 
101
 
 
102
   R35_FUNC(Bool32)   R35PackProport(
 
103
       RecRaster*  raster,          // raster description
 
104
       Word16*  Image3x5,
 
105
       Int32 TO_X, Int32 TO_Y);       // result
 
106
 
 
107
   R35_FUNC(Bool32)   R35PackProportHor16(
 
108
        RecRaster   *raster,
 
109
        Word16      *Image3x5, Int32    *to_x,  Int32   *to_y);
 
110
 
 
111
   R35_FUNC(Bool32)  R35RecogCharIm3x5(
 
112
      Word16*  Im3x5,         // image 3x5
 
113
      RecVersions* R35res );
 
114
 
 
115
   R35_FUNC(Bool32)  R35RecogCharIm3x5_expert(
 
116
      Word16*  Im3x5,         // image 3x5
 
117
      RecVersions* R35res );
 
118
 
 
119
 
 
120
   R35_FUNC(Bool32)  R35RecogPrintCharIm3x5(
 
121
      Word16*  Im3x5,         // image 3x5
 
122
      RecVersions* R35res );
 
123
 
 
124
   R35_FUNC(Bool32)  R35RecogPrintCharIm3x5_expert(
 
125
      Word16*  Im3x5,         // image 3x5
 
126
      RecVersions* R35res, Bool32 r5x3 );
 
127
 
 
128
   R35_FUNC(Bool32)  R35RecogNdxIm3x5(
 
129
      Word16*  Im3x5,         // image 3x5
 
130
      RecVersions* R35res );
 
131
 
 
132
   R35_FUNC(Bool32)  R35RecogNdxIm3x5_expert(
 
133
      Word16*  Im3x5,         // image 3x5
 
134
      RecVersions* R35res );
 
135
 
 
136
   R35_FUNC(void)  R35Done(void);
 
137
      // Stop function. Call after R35Init()
 
138
 
 
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) ;
 
150
 
 
151
// error code
 
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
 
162
 
 
163
   #ifdef __cplusplus
 
164
            }
 
165
   #endif
 
166
 
 
167
#endif
 
168