Ask Your Question

engineer1's profile - activity

2015-02-20 03:49:33 -0600 asked a question error in ocr for text detection

hi i write a programe for text detection:

#include  "opencv2/text.hpp"
#include  "opencv2/highgui.hpp"
#include  "opencv2/imgproc.hpp"

#include  <vector>
#include  <iostream>
#include  <iomanip>

using namespace std;
using namespace cv;
using namespace cv::text;

int main()
{
    Mat src, gray, dst;
    string text;
    src = imread("C:/Users/Ali Tabasi/Desktop/matn.png");

    cvtColor(src, gray, COLOR_RGB2GRAY);
    /*adaptiveThreshold(gray, dst, 255, ADAPTIVE_THRESH_GAUSSIAN_C, THRESH_BINARY, 3, 5);
    imshow("bin non filter", dst);*/
    GaussianBlur(src, src, Size(3,3), 0, 0, BORDER_CONSTANT);
    cvtColor(src, gray, COLOR_RGB2GRAY);
    adaptiveThreshold(gray, dst, 255, ADAPTIVE_THRESH_GAUSSIAN_C, THRESH_BINARY, 3, 5);

    Ptr<OCRTesseract> ocr = OCRTesseract::create();
    vector<Rect>   boxes;
    vector<string> words;
    vector<float>  confidences;
    ocr->run(dst, text, &boxes, &words, &confidences, OCR_LEVEL_WORD);
    cout << text;

    imshow("gray", gray);
    imshow("input", src);
    imshow("bin", dst);
    waitKey(0);
}

image description i dont know problem? please help me

2015-02-17 00:57:01 -0600 asked a question Who has been the text detection with ocr of the project?

hi i want text detection with ocr please help me

2015-02-14 09:45:33 -0600 commented question how use OCRTesseract::create

doesn't Rightly detection text. no any errors in during compile & run. don't print text in disply

2015-02-14 05:21:06 -0600 asked a question how use OCRTesseract::create

hi all I want detection text in image and print text with ocr I use from sample of ocr in https://github.com/Itseez/opencv_cont... but dont print text now help me for use OCRTesseract::create? thanks