File: blobs.h

package info (click to toggle)
tesseract 2.04-2%2Bsqueeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 7,336 kB
  • ctags: 6,860
  • sloc: cpp: 81,388; sh: 3,446; java: 1,220; makefile: 376
file content (119 lines) | stat: -rw-r--r-- 3,632 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/* -*-C-*-
 ********************************************************************************
 *
 * File:        blobs.h  (Formerly blobs.h)
 * Description:  Blob definition
 * Author:       Mark Seaman, OCR Technology
 * Created:      Fri Oct 27 15:39:52 1989
 * Modified:     Thu Mar 28 15:33:38 1991 (Mark Seaman) marks@hpgrlt
 * Language:     C
 * Package:      N/A
 * Status:       Experimental (Do Not Distribute)
 *
 * (c) Copyright 1989, Hewlett-Packard Company.
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
 ** You may obtain a copy of the License at
 ** http://www.apache.org/licenses/LICENSE-2.0
 ** Unless required by applicable law or agreed to in writing, software
 ** distributed under the License is distributed on an "AS IS" BASIS,
 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ** See the License for the specific language governing permissions and
 ** limitations under the License.
 *
 *********************************************************************************/

#ifndef BLOBS_H
#define BLOBS_H

/*----------------------------------------------------------------------
              I n c l u d e s
----------------------------------------------------------------------*/
#include                   "vecfuncs.h"
#include  "tessclas.h"

/*----------------------------------------------------------------------
              T y p e s
----------------------------------------------------------------------*/
typedef struct
{                                /* Widths of pieces */
  int num_chars;
  int widths[1];
} WIDTH_RECORD;

/*----------------------------------------------------------------------
              M a c r o s
----------------------------------------------------------------------*/
/**********************************************************************
 * free_widths
 *
 * Free the memory taken up by a width array.
 **********************************************************************/
#define free_widths(w)  \
if (w) memfree (w)

/*----------------------------------------------------------------------
              F u n c t i o n s
----------------------------------------------------------------------*/
void blob_origin(TBLOB *blob,      /*blob to compute on */
                 TPOINT *origin);  /*return value */

                                 /*blob to compute on */
void blob_bounding_box(TBLOB *blob,
                       register TPOINT *topleft,  /*bounding box */
                       register TPOINT *botright);

void blobs_bounding_box(TBLOB *blobs, TPOINT *topleft, TPOINT *botright); 

void blobs_origin(TBLOB *blobs,     /*blob to compute on */
                  TPOINT *origin);  /*return value */

                                 /*blob to compute on */
WIDTH_RECORD *blobs_widths(TBLOB *blobs); 

int count_blobs(TBLOB *blobs); 

void delete_word(TWERD *word); 

void delete_edgepts(register EDGEPT *edgepts); 

/*
#if defined(__STDC__) || defined(__cplusplus)
# define	_ARGS(s) s
#else
# define	_ARGS(s) ()
#endif*/

/* blobs.c
void blob_origin
  _ARGS((BLOB *blob,
  TPOINT *origin));

void blob_bounding_box
  _ARGS((BLOB *blob,
  TPOINT *topleft,
  TPOINT *botright));

void blobs_bounding_box
  _ARGS((BLOB *blobs,
  TPOINT *topleft,
  TPOINT *botright));

void blobs_origin
  _ARGS((BLOB *blobs,
  TPOINT *origin));

WIDTH_RECORD *blobs_widths
  _ARGS((BLOB *blobs));

int count_blobs
  _ARGS((BLOB *blobs));

void delete_word
  _ARGS((TWERD *word));

void delete_edgepts
  _ARGS((EDGEPT *edgepts));
#undef _ARGS
*/
#endif