MCPcopy Create free account
hub / github.com/creatale/node-dv / SetImage

Method SetImage

deps/tesseract/api/baseapi.cpp:521–529  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

519 * will automatically perform recognition.
520 */
521void 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
531void TessBaseAPI::SetSourceResolution(int ppi) {
532 if (thresholder_)

Callers 6

NAN_METHODFunction · 0.45
NAN_SETTERFunction · 0.45
TessBaseAPISetImageFunction · 0.45
TessBaseAPISetImage2Function · 0.45
mainFunction · 0.45

Calls 1

GetPixRectMethod · 0.80

Tested by

no test coverage detected