ho_layout.h man page

src/ho_layout.h — libhocr C language header.

Synopsis

#include <ho_bitmap.h>
#include <ho_objmap.h>

Data Structures

struct ho_layout
libhocr layout struct

Defines

#define HO_LAYOUT_H 1

Functions

ho_layout * ho_layout_new (const ho_bitmap *m_page_text, const char font_spacing_code, const unsigned char type, const unsigned char dir)

int ho_layout_free (ho_layout *l_page)

int ho_layout_create_block_mask (ho_layout *l_page)

int ho_layout_create_line_mask (ho_layout *l_page, const int block_index)

int ho_layout_create_word_mask (ho_layout *l_page, const int block_index, const int line_index)

int ho_layout_create_font_mask (ho_layout *l_page, const int block_index, const int line_index, const int word_index, const unsigned char slicing_threshold, const unsigned char slicing_width, const unsigned char line_leeway)

ho_bitmap * ho_layout_get_block_text (const ho_layout *l_page, int block_index)

ho_bitmap * ho_layout_get_line_text (const ho_layout *l_page, int block_index, int line_index)

ho_bitmap * ho_layout_get_word_text (const ho_layout *l_page, int block_index, int line_index, int word_index)

ho_bitmap * ho_layout_get_font_text (const ho_layout *l_page, int block_index, int line_index, int word_index, int font_index)

ho_bitmap * ho_layout_get_line_line_mask (const ho_layout *l_page, int block_index, int line_index)

ho_bitmap * ho_layout_get_word_line_mask (const ho_layout *l_page, int block_index, int line_index, int word_index)

ho_bitmap * ho_layout_get_font_line_mask (const ho_layout *l_page, int block_index, int line_index, int word_index, int font_index)

Detailed Description

libhocr C language header.

libhocr - LIBrary for Hebrew Optical Character Recognition

Define Documentation

#define HO_LAYOUT_H 1

Function Documentation

ho_layout* ho_layout_new (const ho_bitmap * m_page_text, const char font_spacing_code, const unsigned char type, const unsigned char dir)

new ho_layout

Parameters:

m_page_text a pointer to a text bitmap
font_spacing_code -3 tight .. 0 .. 3 spaced
type free text blocks or boxed
dir true-ltr false-rtl

Returns:

a newly allocated layout

int ho_layout_free (ho_layout * l_page)

free a ho_layout

Parameters:

l_page a pointer to a ho_layout

Returns:

FALSE

Referenced by hocr::Hocr::do_layout_analysis(), hocr::Hocr::set_bitmap(), hocr::Hocr::set_pixbuf(), and hocr::Hocr::~Hocr().

int ho_layout_create_block_mask (ho_layout * l_page)

create a text blocks mask and count blocks in n_blocks

Parameters:

l_page a pointer to a ho_layout

Returns:

FALSE

int ho_layout_create_line_mask (ho_layout * l_page, const int block_index)

create a text lines mask and count lines in n_lines[block_index]

Parameters:

l_page a pointer to a ho_layout
block_index the block_index to work on

Returns:

FALSE

int ho_layout_create_word_mask (ho_layout * l_page, const int block_index, const int line_index)

create a text word mask and count words in n_words[block_index][line_index]

Parameters:

l_page a pointer to a ho_layout
block_index the block_index to work on
line_index the line_index to work on

Returns:

FALSE

int ho_layout_create_font_mask (ho_layout * l_page, const int block_index, const int line_index, const int word_index, const unsigned char slicing_threshold, const unsigned char slicing_width, const unsigned char line_leeway)

create a text font mask and count fonts in n_fontss[block_index][line_index][word_index]

Parameters:

l_page a pointer to a ho_layout
block_index the block_index to work on
line_index the line_index to work on
word_index the word_index to work on
slicing_threshold the slicing threshold
slicing_width the slicing width
line_leeway the line leeway below and above line

Returns:

FALSE

ho_bitmap* ho_layout_get_block_text (const ho_layout * l_page, int block_index)

new ho_bitamp of the text in a layout block

Parameters:

l_page the ho_layout to use
block_index block index

Returns:

newly allocated ho_bitmap

ho_bitmap* ho_layout_get_line_text (const ho_layout * l_page, int block_index, int line_index)

new ho_bitamp of the text in a layout line

Parameters:

l_page the ho_layout to use
block_index block index
line_index line index

Returns:

newly allocated ho_bitmap

ho_bitmap* ho_layout_get_word_text (const ho_layout * l_page, int block_index, int line_index, int word_index)

new ho_bitamp of the text in a layout word

Parameters:

l_page the ho_layout to use
block_index block index
line_index line index
word_index word index

Returns:

newly allocated ho_bitmap

ho_bitmap* ho_layout_get_font_text (const ho_layout * l_page, int block_index, int line_index, int word_index, int font_index)

new ho_bitamp of the text in a layout font

Parameters:

l_page the ho_layout to use
block_index block index
line_index line index
word_index word index
font_index font index

Returns:

newly allocated ho_bitmap

ho_bitmap* ho_layout_get_line_line_mask (const ho_layout * l_page, int block_index, int line_index)

new ho_bitamp of the line in a layout line

Parameters:

l_page the ho_layout to use
block_index block index
line_index line index

Returns:

newly allocated ho_bitmap

ho_bitmap* ho_layout_get_word_line_mask (const ho_layout * l_page, int block_index, int line_index, int word_index)

new ho_bitamp of the line in a layout word

Parameters:

l_page the ho_layout to use
block_index block index
line_index line index
word_index word index

Returns:

newly allocated ho_bitmap

ho_bitmap* ho_layout_get_font_line_mask (const ho_layout * l_page, int block_index, int line_index, int word_index, int font_index)

new ho_bitamp of the line in a layout font

Parameters:

l_page the ho_layout to use
block_index block index
line_index line index
word_index word index
font_index font index

Returns:

newly allocated ho_bitmap

Author

Generated automatically by Doxygen for libhocr from the source code.

Info

31 Jul 2008 Version 0.10.17 libhocr