20 #ifndef TESSERACT_TEXTORD_IMAGEFIND_H_
21 #define TESSERACT_TEXTORD_IMAGEFIND_H_
33 class ColPartitionGrid;
34 class ColPartition_LIST;
71 double max_skew_gradient,
int *x_start,
int *y_start,
int *x_end,
84 const uint8_t *point);
87 static uint32_t
ComposeRGB(uint32_t r, uint32_t g, uint32_t b);
103 Image color_map2,
Image rms_map, uint8_t *color1,
static bool BlankImageInBetween(const TBOX &box1, const TBOX &box2, const TBOX &im_box, const FCOORD &rotation, Image pix)
static bool pixNearlyRectangular(Image pix, double min_fraction, double max_fraction, double max_skew_gradient, int *x_start, int *y_start, int *x_end, int *y_end)
static void ConnCompAndRectangularize(Image pix, DebugPixa *pixa_debug, Boxa **boxa, Pixa **pixa)
static bool BoundsWithinRect(Image pix, int *x_start, int *y_start, int *x_end, int *y_end)
static void ComputeRectangleColors(const TBOX &rect, Image pix, int factor, Image color_map1, Image color_map2, Image rms_map, uint8_t *color1, uint8_t *color2)
static uint32_t ComposeRGB(uint32_t r, uint32_t g, uint32_t b)
static void FindImagePartitions(Image image_pix, const FCOORD &rotation, const FCOORD &rerotation, TO_BLOCK *block, TabFind *tab_grid, DebugPixa *pixa_debug, ColPartitionGrid *part_grid, ColPartition_LIST *big_parts)
static uint8_t ClipToByte(double pixel)
static void TransferImagePartsToImageMask(const FCOORD &rerotation, ColPartitionGrid *part_grid, Image image_mask)
static Image FindImages(Image pix, DebugPixa *pixa_debug)
static int CountPixelsInRotatedBox(TBOX box, const TBOX &im_box, const FCOORD &rotation, Image pix)
static double ColorDistanceFromLine(const uint8_t *line1, const uint8_t *line2, const uint8_t *point)