mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 23:19:07 +08:00
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:
parent
f6250e6dfe
commit
eeda2297ca
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user