/usr/include/libhocr/ho_font.h is in libhocr-dev 0.10.18-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | /***************************************************************************
* ho_font.h
*
* Fri Aug 12 20:13:33 2005
* Copyright 2005-2007 Yaacov Zamir
* <kzamir@walla.co.il>
****************************************************************************/
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file ho_font.h
@brief libhocr C language header.
libhocr - LIBrary for Hebrew Optical Character Recognition
*/
#ifndef HO_FONT_H
#define HO_FONT_H 1
#include <ho_bitmap.h>
#include <ho_objmap.h>
/**
return a bitmap of the main signs in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_main_sign (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of the second object sign in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_second_object (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of holes in the bitmap
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_holes (const ho_bitmap * m_text, const ho_bitmap * m_mask);
/**
return a bitmap of horizontal bars found in the bitmap
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_hbars (const ho_bitmap * m_text, const ho_bitmap * m_mask);
/**
return a bitmap of vertical bars found in the bitmap
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_vbars (const ho_bitmap * m_text, const ho_bitmap * m_mask);
/**
return a bitmap of -45 deg. diagonals found in the bitmap
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_diagonal (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of +45 deg. diagonals found in the bitmap
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_diagonal_left (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a thinned bitmap without fixing artefacts
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_thin_naive (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a thinned bitmap and fix artefacts
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_thin (const ho_bitmap * m_text, const ho_bitmap * m_mask);
/**
return a bitmap of cross points in input image
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_cross (const ho_bitmap * m_text, const ho_bitmap * m_mask);
/**
return a bitmap of end points in input image
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_ends (const ho_bitmap * m_text, const ho_bitmap * m_mask);
/**
return a bitmap of top side picks in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_edges_top (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of big top side picks in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_edges_top_big (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of bottom side picks in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_edges_bottom (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of big bottom side picks in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_edges_bottom_big (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of left side picks in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_edges_left (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of big left side picks in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_edges_left_big (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of right side picks in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_edges_right (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of big right side picks in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_edges_right_big (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of top side notches in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_notch_top (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of bottom side notches in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_notch_bottom (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of left side notches in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_notch_left (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of right side notches in the font
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_notch_right (const ho_bitmap * m_text,
const ho_bitmap * m_mask);
/**
return a bitmap of a filter
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@param filter_index the index of the filter to use
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_filter (const ho_bitmap * m_text,
const ho_bitmap * m_mask, int filter_index);
/**
return a bitmap of a filter used on font holes
@param m_text pointer to the text bitmap
@param m_mask pointer to the line map
@param filter_index the index of the filter to use
@return a newly allocated bitmap
*/
ho_bitmap *ho_font_holes_filter (const ho_bitmap * m_text,
const ho_bitmap * m_mask, int filter_index);
/**
writes font to file
@param m_text ho_bitmap of main font
@param m_nikud ho_bitmap of nikud
@param m_mask ho_bitmap of line
@param filename save as file name
@return FALSE
*/
int
ho_font_pnm_save (const ho_bitmap * m_text, const ho_bitmap * m_nikud,
const ho_bitmap * m_mask, const char *filename);
/**
read ho_pixbuf from file
@param m_text pointer to return ho_bitmap of main font
@param m_nikud pointer to return ho_bitmap of nikud
@param m_mask pointer to return ho_bitmap of line
@param filename file name
@return newly allocated ho_pixbuf
*/
int
ho_font_pnm_load (ho_bitmap ** m_text, ho_bitmap ** m_nikud,
ho_bitmap ** m_mask, const char *filename);
#endif /* HO_FONT_H */
|