ho_objmap.h(3)
| src/ho_objmap.h(3) | libhocr | src/ho_objmap.h(3) |
NAME
src/ho_objmap.h - libhocr C language header.
SYNOPSIS
#include <ho_bitmap.h>
Data Structures
struct ho_obj
libhocr object struct struct ho_objlist
libhocr object list struct struct ho_objmap
libhocr object map struct
Defines
#define HO_OBJMAP_H 1
#define ho_objmap_set(m, x, y, val) (((m)->map)[(x) + (y) *
(m)->width] = (val))
#define ho_objmap_get(m, x, y) (((m)->map)[(x) + (y) *
(m)->width])
#define ho_objmap_get_size(m) ((m)->obj_list->size)
#define ho_objmap_get_object(m, i) ((m)->obj_list->objects[(i)])
#define ho_objmap_get_width(m) ((m)->width)
#define ho_objmap_get_height(m) ((m)->height)
Functions
ho_objlist * ho_objlist_new ()
int ho_objlist_free (ho_objlist *object_list)
int ho_objlist_add (ho_objlist *object_list, double weight, int
x, int y, int width, int height)
int ho_objlist_get_index (ho_objlist *object_list, int index)
ho_obj * ho_objlist_get_object (ho_objlist *object_list,
int index)
int ho_objlist_add_pixel (ho_objlist *object_list, int index,
int x, int y)
int ho_objlist_link (ho_objlist *object_list, int index1, int
index2)
int ho_objlist_clean (ho_objlist *object_list, int **map)
int ho_objlist_clean_by_reading_index (ho_objlist *object_list,
int **map)
int ho_objlist_print (ho_objlist *object_list)
int ho_objlist_statistics (ho_objlist *object_list, int
min_height, int max_height, int min_width, int max_width, int *counter,
double *weight_avg, double *weight_com, double *weight_min, double
*weight_max, int *height_avg, int *height_com, int *height_min, int
*height_max, int *width_avg, int *width_com, int *width_min, int *width_max)
ho_objmap * ho_objmap_new (const int width, const int height)
int ho_objmap_free (ho_objmap *m)
int ho_objmap_clean (ho_objmap *m)
int ho_objmap_sort_by_reading_index (ho_objmap *m, const
unsigned char col, const unsigned char dir_ltr)
ho_objmap * ho_objmap_new_from_bitmap (const ho_bitmap
*bit_in)
int ho_objmap_font_metrix (const ho_objmap *m, const int
min_height, const int max_height, const int min_width, const int max_width,
int *height, int *width, unsigned char *nikud)
ho_bitmap * ho_objmap_to_bitmap (const ho_objmap *obj_in)
ho_bitmap * ho_objmap_to_bitmap_by_size (const ho_objmap
*m, int min_height, int max_height, int min_width, int max_width)
ho_bitmap * ho_objmap_to_bitmap_by_index (const ho_objmap
*m, const int index)
ho_bitmap * ho_objmap_to_bitmap_by_index_window (const
ho_objmap *m, const int index, const int frame)
int ho_objmap_update_reading_index (ho_objmap *m, const unsigned
char n_columns, const unsigned char dir_ltr)
ho_obj * ho_objmap_get_object_by_index (ho_objmap *m, int
index)
Detailed Description
libhocr C language header.
libhocr - LIBrary for Hebrew Optical Character Recognition
Define Documentation
#define HO_OBJMAP_H 1
#define ho_objmap_set(m, x, y, val) (((m)->map)[(x) + (y) * (m)->width] = (val))
#define ho_objmap_get(m, x, y) (((m)->map)[(x) + (y) * (m)->width])
#define ho_objmap_get_size(m) ((m)->obj_list->size)
#define ho_objmap_get_object(m, i) ((m)->obj_list->objects[(i)])
#define ho_objmap_get_width(m) ((m)->width)
#define ho_objmap_get_height(m) ((m)->height)
Function Documentation
ho_objlist* ho_objlist_new ()
int ho_objlist_free (ho_objlist * object_list)
int ho_objlist_add (ho_objlist * object_list, double weight, int x, int y, int width, int height)
int ho_objlist_get_index (ho_objlist * object_list, int index)
ho_obj* ho_objlist_get_object (ho_objlist * object_list, int index)
int ho_objlist_add_pixel (ho_objlist * object_list, int index, int x, int y)
int ho_objlist_link (ho_objlist * object_list, int index1, int index2)
int ho_objlist_clean (ho_objlist * object_list, int ** map)
int ho_objlist_clean_by_reading_index (ho_objlist * object_list, int ** map)
int ho_objlist_print (ho_objlist * object_list)
int ho_objlist_statistics (ho_objlist * object_list, int min_height, int max_height, int min_width, int max_width, int * counter, double * weight_avg, double * weight_com, double * weight_min, double * weight_max, int * height_avg, int * height_com, int * height_min, int * height_max, int * width_avg, int * width_com, int * width_min, int * width_max)
ho_objmap* ho_objmap_new (const int width, const int height)
new ho_pixbuf
Parameters:
width width of pixbuf in pixels
Returns:
int ho_objmap_free (ho_objmap * m)
free an ho_objmap
Parameters:
Returns:
int ho_objmap_clean (ho_objmap * m)
clean the ho_objmap index list
Parameters:
Returns:
int ho_objmap_sort_by_reading_index (ho_objmap * m, const unsigned char col, const unsigned char dir_ltr)
sort the ho_objmap by reading index
Parameters:
col numbere of columns
dir_ltr true-ltr false-rtl
Returns:
ho_objmap* ho_objmap_new_from_bitmap (const ho_bitmap * bit_in)
new ho_objmap from ho_bitmap
Parameters:
Returns:
int ho_objmap_font_metrix (const ho_objmap * m, const int min_height, const int max_height, const int min_width, const int max_width, int * height, int * width, unsigned char * nikud)
guess font metrics
Parameters:
min_height only objects with this minimal height are used
max_height only objects with this maximal height are used
min_width only objects with this minimal width are used
max_width only objects with this maximal width are used
height pointer to return the guessed font average height
width pointer to return the guessed font average width
nikud pointer to return the guessed nikud in page
Returns:
ho_bitmap* ho_objmap_to_bitmap (const ho_objmap * obj_in)
new ho_bitamp from objmap
Parameters:
Returns:
ho_bitmap* ho_objmap_to_bitmap_by_size (const ho_objmap * m, int min_height, int max_height, int min_width, int max_width)
copy objects from objmap to bitmap by size
Parameters:
min_height only objects with this minimal height are copied
max_height only objects with this maximal height are copied
min_width only objects with this minimal width are copied
max_width only objects with this maximal width are copied
Returns:
ho_bitmap* ho_objmap_to_bitmap_by_index (const ho_objmap * m, const int index)
copy objects from objmap to bitmap by index
Parameters:
index the index of the object to copy
Returns:
ho_bitmap* ho_objmap_to_bitmap_by_index_window (const ho_objmap * m, const int index, const int frame)
copy objects from objmap to bitmap by index of the object
Parameters:
index the index of the object to copy
frame size of white frame in the new bitmap
Returns:
int ho_objmap_update_reading_index (ho_objmap * m, const unsigned char n_columns, const unsigned char dir_ltr)
guess reading_index
Parameters:
n_columns numbere of columns
dir_ltr true-ltr false-rtl
Returns:
ho_obj* ho_objmap_get_object_by_index (ho_objmap * m, int index)
get an object by index
Parameters:
index the object index
Returns:
Author
Generated automatically by Doxygen for libhocr from the source code.
| 31 Jul 2008 | Version 0.10.17 |
