I applied 'OpenCvSharp3-AnyCPU' with tesseract.net to OCR, and I want to directly send 'Mat' to 'Pix', then set property of SetImage as following:
Pix pix = cvtMat2PIX(image);
// Set the input image
tessBaseAPI.SetImage(pix);
The method to transfer Mat to Pix:
public static Pix cvtMat2PIX(Mat imgGray)
{
int cols = imgGray.Cols;
int rows = imgGray.Rows;
Pix pix = new Pix(imgGray.Data);
return pix;
}
However, it's useless, anybody who can solve the issue? Tks a lot!
I applied 'OpenCvSharp3-AnyCPU' with tesseract.net to OCR, and I want to directly send 'Mat' to 'Pix', then set property of SetImage as following: Pix pix = cvtMat2PIX(image); // Set the input image tessBaseAPI.SetImage(pix);
The method to transfer Mat to Pix: public static Pix cvtMat2PIX(Mat imgGray) { int cols = imgGray.Cols; int rows = imgGray.Rows; Pix pix = new Pix(imgGray.Data); return pix; }
However, it's useless, anybody who can solve the issue? Tks a lot!