* Provide an image for Tesseract to recognize. Format is as * TesseractRect above. Copies the image buffer and converts to Pix. * SetImage clears all recognition results, and sets the rectangle to the * full image, so it may be followed immediately by a GetUTF8Text, and it * will automatically perform recognition. */
| 519 | * will automatically perform recognition. |
| 520 | */ |
| 521 | void TessBaseAPI::SetImage(const unsigned char* imagedata, |
| 522 | int width, int height, |
| 523 | int bytes_per_pixel, int bytes_per_line) { |
| 524 | if (InternalSetImage()) { |
| 525 | thresholder_->SetImage(imagedata, width, height, |
| 526 | bytes_per_pixel, bytes_per_line); |
| 527 | SetInputImage(thresholder_->GetPixRect()); |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | void TessBaseAPI::SetSourceResolution(int ppi) { |
| 532 | if (thresholder_) |
no test coverage detected