0
votes

Error Message

Error Message,

I am very new to both tesseract, matlab and opencv. I am trying to integrate tesseract-ocr to work with my c++ program to detect license plate that i locate. But c++ is throwing me errors. I need help on loading my MAT image to tesseract to identify the characters in it.

This is the license plate image, it is a MAT variable

This is the license plate image, it is a MAT variable

I have made the necessary changes to the system properties such as including the the tesseract include files to the project. And including liblept168.lib liblept168d.lib libtesseract302.lib to the additional dependencies and all.

    imshow("Plate", plate);
    imshow("Blob", Blob);
    int threshold = otsn(plate);
    Mat plateequal = EHistogram(plate);
    Mat converttob = converttobinary(plate,threshold);
    imshow("Plate This", plateequal);

//the variable "plate" holds the number plate image that i want tesseract to process

    tesseract::TessBaseAPI tess;
    cv::Mat sub = plate;
    tess.SetImage((uchar*)sub.data, sub.size().width, sub.size().height, sub.channels(), sub.step1());
    tess.Recognize(0);
    const char* out = tess.GetUTF8Text();

"Error 13 error LNK2001: unresolved external symbol "public: void __cdecl tesseract::TessBaseAPI::SetImage(unsigned char const *,int,int,int,int)" (?SetImage@TessBaseAPI@tesseract@@QEAAXPEBEHHHH@Z) C:\Users\Sahilan Mahendran\Documents\Visual Studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.obj ConsoleApplication1"

This is one of the error message i get prompted when running the program.

1
have you tried this Opencv version of OCR sample github.com/opencv/opencv_contrib/blob/master/modules/text/… its seem people already tried similar thing and without any issueDr Yuan Shenghai

1 Answers

0
votes

Unresolved external symbol means that the compiler/linker can find the declaration of the function, but cannot find its definition. As if you forgot to add the cpp file to your project.