emna ouerteni
asked on
tesseract ocr + opencv+ visual studio 2010
i included opencv and tesseract ocr in visual studio
and
#include<opencv2\core\core.hpp>
#include<opencv2\highgui\highgui.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include<baseapi.h>
#include<allheaders.h>
#include<iostream>
#include <vector>
#include <fstream>
#define _CRT_SECURE_NO_WARNINGS
using namespace cv;
using namespace std;
tesseract::TessBaseAPI ocr;
int main()
{
Mat input = imread("C:\\eurotext.tif",1);
cvtColor( input, input, CV_BGR2GRAY );
ocr.Init(NULL, "eng", tesseract::OEM_TESSERACT_ONLY);
ocr.SetPageSegMode(tesseract::PSM_SINGLE_BLOCK);
ocr.SetImage(input.data, input.cols, input.rows, 1, input.step);
char* text = ocr.GetUTF8Text();
cout << "Text:" << endl;
cout << text << endl;
cout << "Confidence: " << ocr.MeanTextConf() << endl << endl;
}
the build was succeeded but when runningand
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Try putting file in a temp folder and making sure full permissions to read/write.