~ubuntu-branches/debian/experimental/cuneiform/experimental

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/rneg/sources/src/h/negrecog.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
#include <stdio.h>
 
58
/*#include <windows.h>*/
 
59
 
 
60
 
 
61
#include "ccom.h"
 
62
#include "ctiimage.h"
 
63
#include "exc.h"
 
64
#include "recdefs.h"
 
65
#include "negdefs.h"
 
66
#include "rstr.h"
 
67
#include "dpuma.h"
 
68
#include "cpage.h"
 
69
#include "cstr.h"
 
70
#include "rselstr.h"
 
71
 
 
72
 
 
73
/*----------------------------------------------------------------------------*/
 
74
 
 
75
//���������
 
76
 
 
77
 
 
78
extern int min_let_h;
 
79
extern int min_let_w;
 
80
//extern int max_let_h;
 
81
//extern int max_let_w;
 
82
extern int NegRecTYPEE;
 
83
extern double inf_prob;
 
84
/*----------------------------------------------------------------------------*/
 
85
 
 
86
//���������
 
87
 
 
88
extern int      DPIX;
 
89
extern int      DPIY;
 
90
extern int Height;
 
91
extern int Width;
 
92
extern double inf_prob;
 
93
extern Word8 ImageName[CPAGE_MAXNAME];
 
94
extern Handle NegRecD;
 
95
extern Handle NegResD;
 
96
extern Handle NegRecDC;
 
97
extern Handle MainWindowD;
 
98
extern Handle RecOneLetter;
 
99
extern Handle PrintResConsole;
 
100
extern Handle hShowNegComps;
 
101
 
 
102
/*----------------------------------------------------------------------------*/
 
103
 
 
104
 
 
105
 
 
106
 
 
107
//My function's diclarations
 
108
 
 
109
BOOL InitNegMas(Rect16**,int);
 
110
BOOL InitNegMas(RecVersions**,int);
 
111
BOOL InitNegMas(UniVersions**,int);
 
112
BOOL InitNegMas(CCOM_comp***,int);
 
113
void DelNegMas(Rect16**);
 
114
void DelNegMas(RecVersions*);
 
115
void DelNegMas(UniVersions*);
 
116
void DelNegMas(CCOM_comp**);
 
117
BOOL AddLenNegMas(Rect16**,int&,int);
 
118
BOOL AddLenNegMas(CCOM_comp***,int&,int);
 
119
BOOL GetMasP(Handle,Rect16,Word8**);
 
120
BOOL GetMasP(Rect16*,Word8**);
 
121
BOOL NegGetRaster(Handle,Rect16,RecRaster*,BOOL);
 
122
void InitRc(Rect16*,int,CCOM_comp *);
 
123
void PrintFrameComp(Handle,Rect16*,int);
 
124
Handle GetNegCCOM(Handle,Rect16*,int);
 
125
void NegRecog(Handle,NegList**,int&,int);
 
126
void NegInvert(RecRaster*,Rect16);
 
127
void SortLetter(Rect16*,int,BOOL);
 
128
void ToHoriz(Rect16*,int);
 
129
void NegPrintConsol(Word8*,int);
 
130
void NegPrintConsol(double);
 
131
void NegPrintConsol(int,int,int,int);
 
132
void NegMoveResult(Word8*,int&,int);
 
133
void NegMoveMas(Rect16*,int&,int);
 
134
void PMoveMas(double*,int,int);
 
135
void NegMoveMas(Rotating*,int,int);
 
136
void NegMoveMasR(Rect16*,int&,int);
 
137
void NegPutLetter(Word8*,int&,RecAlt,BOOL);
 
138
int GetMediumW(Rect16*,int);
 
139
int GetMediumH(Rect16*,int);
 
140
BOOL IfExistA(RecVersions);
 
141
BOOL IfGl(Word8);
 
142
BOOL IfExistDef(RecVersions);
 
143
BOOL IfExistI(RecVersions);
 
144
BOOL IfBadResult(Word8*,int);
 
145
BOOL IfNegIn(NegList*,int,int,int,int,int);
 
146
void NegDrawRect(Handle,Word32,Word32,Rect16);
 
147
void NegAr2(Word8*,int,int);
 
148
double NegStrControl(Rect16*,int,BOOL,Rect16*);
 
149
double NegRecControl(int);
 
150
int CountLetter(Rect16*,int,BOOL);
 
151
int NegGetCountOfStr(Rect16*,int);
 
152
void NegPrintInFile(FILE*,NegList*,int);
 
153
int NegCountNumbers(int);
 
154
void NegSetAlf(char*);
 
155
void DeleteRotateMas(Word8**,Int16**,Int16**,Word8**,int**);
 
156
void NegMoveMas(Handle* hCCOM,int n,int num);
 
157
BOOL UnifCont(CCOM_handle to,CCOM_handle from);
 
158
void TurnRaster(RecRaster*);
 
159
void TurnOverNeg(RecRaster, Word8*);
 
160
 
 
161
 
 
162
/*----------------------------------------------------------------------------*/