Remove unused functions ImageFind::ComposeRGB and ImageFind::ClipToByte

Fixes: a1c22fb0d0 ("Fixed issue #557")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2022-02-05 20:13:18 +01:00
parent f6250e6dfe
commit eeda2297ca
2 changed files with 0 additions and 23 deletions

View File

@ -396,23 +396,6 @@ double ImageFind::ColorDistanceFromLine(const uint8_t *line1, const uint8_t *lin
return cross_sq / line_sq; // This is the squared distance.
}
// Returns the leptonica combined code for the given RGB triplet.
uint32_t ImageFind::ComposeRGB(uint32_t r, uint32_t g, uint32_t b) {
l_uint32 result;
composeRGBPixel(r, g, b, &result);
return result;
}
// Returns the input value clipped to a uint8_t.
uint8_t ImageFind::ClipToByte(double pixel) {
if (pixel < 0.0) {
return 0;
} else if (pixel >= 255.0) {
return 255;
}
return static_cast<uint8_t>(pixel);
}
// ================ CUTTING POLYGONAL IMAGES FROM A RECTANGLE ================
// The following functions are responsible for cutting a polygonal image from
// a rectangle: CountPixelsInRotatedBox, AttemptToShrinkBox, CutChunkFromParts

View File

@ -83,12 +83,6 @@ public:
static double ColorDistanceFromLine(const uint8_t *line1, const uint8_t *line2,
const uint8_t *point);
// Returns the leptonica combined code for the given RGB triplet.
static uint32_t ComposeRGB(uint32_t r, uint32_t g, uint32_t b);
// Returns the input value clipped to a uint8_t.
static uint8_t ClipToByte(double pixel);
// Returns true if there are no black pixels in between the boxes.
// The im_box must represent the bounding box of the pix in tesseract
// coordinates, which may be negative, due to rotations to make the textlines