Tesseract 3.01
|
#include <linefind.h>
Static Public Member Functions | |
static void | FindVerticalLines (int resolution, Pix *pix, int *vertical_x, int *vertical_y, TabVector_LIST *vectors) |
static void | FindHorizontalLines (int resolution, Pix *pix, TabVector_LIST *vectors) |
static void | ConvertBoxaToBlobs (int image_width, int image_height, Boxa **boxes, C_BLOB_LIST *blobs) |
The LineFinder class is a simple static function wrapper class that mainly exposes the FindVerticalLines function.
void tesseract::LineFinder::ConvertBoxaToBlobs | ( | int | image_width, |
int | image_height, | ||
Boxa ** | boxes, | ||
C_BLOB_LIST * | blobs | ||
) | [static] |
Converts the Boxa array to a list of C_BLOB, getting rid of severely overlapping outlines and those that are children of a bigger one.
The output is a list of C_BLOBs that are owned by the list.
The C_OUTLINEs in the C_BLOBs contain no outline data - just empty bounding boxes. The Boxa is consumed and destroyed.
void tesseract::LineFinder::FindHorizontalLines | ( | int | resolution, |
Pix * | pix, | ||
TabVector_LIST * | vectors | ||
) | [static] |
Finds horizontal line objects in the given pix.
Uses the given resolution to determine size thresholds instead of any that may be present in the pix.
The output vectors are owned by the list and Frozen (cannot refit) by having no boxes, as there is no need to refit or merge separator lines.
void tesseract::LineFinder::FindVerticalLines | ( | int | resolution, |
Pix * | pix, | ||
int * | vertical_x, | ||
int * | vertical_y, | ||
TabVector_LIST * | vectors | ||
) | [static] |
Finds vertical line objects in the given pix.
Uses the given resolution to determine size thresholds instead of any that may be present in the pix.
The output vertical_x and vertical_y contain a sum of the output vectors, thereby giving the mean vertical direction.
The output vectors are owned by the list and Frozen (cannot refit) by having no boxes, as there is no need to refit or merge separator lines.