Allow line images with larger width

Line images can be larger than the old limit, especially when training
is made with newspaper lines.

    Image too large to learn!! Size = 2641x36
    Image too large to learn!! Size = 2704x36
    Image too large to learn!! Size = 2751x36
    Image too large to learn!! Size = 3738x36

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2020-05-10 09:04:39 +02:00
parent 43bbcd4ce2
commit 34bdc8b74e

View File

@ -266,7 +266,7 @@ bool LSTMRecognizer::RecognizeLine(const ImageData& image_data, bool invert,
float* scale_factor, NetworkIO* inputs,
NetworkIO* outputs) {
// Maximum width of image to train on.
const int kMaxImageWidth = 2560;
const int kMaxImageWidth = 4096;
// This ensures consistent recognition results.
SetRandomSeed();
int min_width = network_->XScaleFactor();