This file is indexed.

/usr/include/libhocr/ho_segment.h is in libhocr-dev 0.10.17-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
/***************************************************************************
 *            ho_segment.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_segment.h
    @brief libhocr C language header.
    
    libhocr - LIBrary for Hebrew Optical Character Recognition 
*/

#ifndef HO_SEGMENT_H
#define HO_SEGMENT_H 1

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

/**
 return a bitmap of the paragraphs, 
 font and line dimentions _must_ be set
 @param m pointer to an ho_bitmap
 @param box squre (boxes) or free formed text blocks 
 @param font_height_factor_min filter objects height min
 @param font_height_factor_max filter objects height max
 @param font_width_factor_min filter objects width min
 @param font_width_factor_max filter objects width max
 @param horizontal_link_factor link horizontaly factor
 @param vertical_link_factor link verticaly factor
 @return a newly allocated bitmap
 */
ho_bitmap *ho_segment_paragraphs_fine (const ho_bitmap * m,
  const unsigned char box, const double font_height_factor_min,
  const double font_height_factor_max, const double font_width_factor_min,
  const double font_width_factor_max, const double horizontal_link_factor,
  const double vertical_link_factor);

/**
 return a bitmap of the paragraphs, 
 font and line dimentions _must_ be set
 @param m pointer to an ho_bitmap
 @param box squre (boxes) or free formed text blocks 
 @return a newly allocated bitmap
 */
ho_bitmap *ho_segment_paragraphs (const ho_bitmap * m, const unsigned char box);

/**
 return a bitmap of the lines
 @param m pointer to an ho_bitmap
 @param font_height_factor_min filter objects height min
 @param font_height_factor_max filter objects height max
 @param font_width_factor_min filter objects width min
 @param font_width_factor_max filter objects width max
 @param link_arg factor for linking letters in line
 @param link_arg_2 factor for linking letters in line
 @param extend_arg factor for extemding lines horizontaly
 @param extend_arg_2 factor for extemding lines horizontaly
 @param erode_arg factor for eroding line sourface
 @return a newly allocated bitmap
 */
ho_bitmap *ho_segment_lines_fine (const ho_bitmap * m,
  const double font_height_factor_min, const double font_height_factor_max,
  const double font_width_factor_min, const double font_width_factor_max,
  const double link_arg, const double link_arg_2,
  const double extend_arg, const double extend_arg_2, const double erode_arg);

/**
 return a bitmap of the lines
 @param m pointer to an ho_bitmap
 @return a newly allocated bitmap
 */
ho_bitmap *ho_segment_lines (const ho_bitmap * m);

/**
 return a bitmap of the words
 @param m pointer to an ho_bitmap of line
 @param m_line_map pointer to an ho_bitmap of line box
 @param horizontal_link_factor horizontal link factor
 @param top_frame_factor top frame factor
 @param bottom_frame_factor bottom frame factor
 @return a newly allocated bitmap
 */
ho_bitmap *ho_segment_words_fine (const ho_bitmap * m,
  const ho_bitmap * m_line_map, const double horizontal_link_factor,
  const double top_frame_factor, const double bottom_frame_factor);

/**
 return a bitmap of the words
 @param m pointer to an ho_bitmap of text
 @param m_line_map pointer to an ho_bitmap of line
 @param font_spacing_code -1:tight 0:normal 1:spaced fonts
 @return a newly allocated bitmap
 */
ho_bitmap *ho_segment_words (const ho_bitmap * m, const ho_bitmap * m_line_map,
  const char font_spacing_code);

/**
 return a bitmap of the interfont spaces
 @param m pointer to an ho_bitmap of text
 @param m_line_map pointer to an ho_bitmap of line
 @param slicing_threshold percent of line fill declared space between fonts
 @param slicing_width percent of font width above try to choop font in two
 @param line_leeway percent of line height to use above and below line
 @return a newly allocated bitmap
 */
ho_bitmap *ho_segment_fonts (const ho_bitmap * m,
  const ho_bitmap * m_line_map,
  const unsigned char slicing_threshold, const unsigned char slicing_width,
  const unsigned char line_leeway);

#endif /* HO_SEGMENT_H */