tesseract
5.0.0-alpha-619-ge9db
|
#include <linefind.h>
Static Public Member Functions | |
static void | FindAndRemoveLines (int resolution, bool debug, Pix *pix, int *vertical_x, int *vertical_y, Pix **pix_music_mask, TabVector_LIST *v_lines, TabVector_LIST *h_lines) |
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.
Definition at line 39 of file linefind.h.
|
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.
Definition at line 319 of file linefind.cpp.
|
static |
Finds vertical and horizontal line objects in the given pix and removes them.
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.
If pix_music_mask != nullptr, and music is detected, a mask of the staves and anything that is connected (bars, notes etc.) will be returned in pix_music_mask, the mask subtracted from pix, and the lines will not appear in v_lines or h_lines.
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.
The detected lines are removed from the pix.
Definition at line 243 of file linefind.cpp.