21 #ifndef TESSERACT_TEXTORD_IMAGEFIND_H__
22 #define TESSERACT_TEXTORD_IMAGEFIND_H__
36 class ColPartitionGrid;
37 class ColPartition_LIST;
69 double min_fraction,
double max_fraction,
70 double max_skew_gradient,
71 int* x_start,
int* y_start,
72 int* x_end,
int* y_end);
79 int* x_end,
int* y_end);
104 Pix* color_map1, Pix* color_map2,
123 const FCOORD& rotation, Pix* pix);
153 ColPartition_LIST* big_parts);
158 #endif // TESSERACT_TEXTORD_LINEFIND_H__
static Pix * FindImages(Pix *pix)
static int CountPixelsInRotatedBox(TBOX box, const TBOX &im_box, const FCOORD &rotation, Pix *pix)
static bool BoundsWithinRect(Pix *pix, int *x_start, int *y_start, int *x_end, int *y_end)
static void ComputeRectangleColors(const TBOX &rect, Pix *pix, int factor, Pix *color_map1, Pix *color_map2, Pix *rms_map, uinT8 *color1, uinT8 *color2)
static double ColorDistanceFromLine(const uinT8 *line1, const uinT8 *line2, const uinT8 *point)
static void FindImagePartitions(Pix *image_pix, const FCOORD &rotation, const FCOORD &rerotation, TO_BLOCK *block, TabFind *tab_grid, ColPartitionGrid *part_grid, ColPartition_LIST *big_parts)
static bool pixNearlyRectangular(Pix *pix, double min_fraction, double max_fraction, double max_skew_gradient, int *x_start, int *y_start, int *x_end, int *y_end)
static uinT32 ComposeRGB(uinT32 r, uinT32 g, uinT32 b)
static void ConnCompAndRectangularize(Pix *pix, Boxa **boxa, Pixa **pixa)
static uinT8 ClipToByte(double pixel)
static bool BlankImageInBetween(const TBOX &box1, const TBOX &box2, const TBOX &im_box, const FCOORD &rotation, Pix *pix)
static void TransferImagePartsToImageMask(const FCOORD &rerotation, ColPartitionGrid *part_grid, Pix *image_mask)