gali8 / Tesseract-OCR-iOS

Tesseract OCR iOS is a Framework for iOS7+, compiled also for armv7s and arm64.
http://www.nexor.it
MIT License
4.22k stars 949 forks source link

A single character is not supported? #174

Closed hnzlk2014 closed 9 years ago

hnzlk2014 commented 9 years ago

Can't analyse layout. Make sure 'osd.traineddata' available in 'tessdata'. Empty page!! Empty page!! image image

ws233 commented 9 years ago

Could you provide your code and any tesseract output, if exists, so we could investigate this issue deeply?

gali8 commented 9 years ago

Have you seen the tessedit_pageseg_mode (kG8ParamTesseditPagesegMode) parameter? https://github.com/gali8/Tesseract-OCR-iOS/blob/master/TesseractOCR/G8TesseractParameters.m http://www.sk-spell.sk.cx/tesseract-ocr-parameters-in-302-version

hnzlk2014 commented 9 years ago

I use the demo project,Not output. Or set some parameters?

ws233 commented 9 years ago

I meant console output of tesseract.

hnzlk2014 commented 9 years ago

image image

2015-05-07 11:33:14.713 Template Framework Project[1204:57294] Can't analyse layout. Make sure 'osd.traineddata' available in 'tessdata'. Empty page!! Empty page!!

Jan-M-B commented 9 years ago

Hi,

I get the same error (Can't analyse layout. Make sure 'osd.traineddata' available in 'tessdata'.) when i try to set PageSegmentationMode to PageSegmentationModeAuto, any help?

I already download that file here (https://github.com/tesseract-ocr/tessdata/blob/master/osd.traineddata) and put in into the tessdata folder, but no success.

kevincon commented 9 years ago

@Jan-M-B which language are you trying to use? Can you post your code?

hovkaren commented 8 years ago

I have same error. My code

    G8RecognitionOperation *operation = [[G8RecognitionOperation alloc] initWithLanguage:@"nep"];
    operation.tesseract.engineMode = G8OCREngineModeTesseractOnly;
    operation.tesseract.pageSegmentationMode = G8PageSegmentationModeAuto;

    operation.delegate = (id)self;
    operation.tesseract.image = bwImage;
    [operationQueue addOperation:operation];

    operation.recognitionCompleteBlock = ^(G8Tesseract *tesseract) {
        // Fetch the recognized text
        NSString *recognizedText = tesseract.recognizedText;

     };

Can help me.