i want to call ocr abby for ios withou callback how i can do it , i loaded licence + init the engine how to get the string result from ocr in the sample project they have casllback but i cant implement it in other project is there other sample without any callback , threads , gcd etc just load engine then return string from image !!! cant continue with i have problems with NSObject<imocrrecognitionmanager>* _recognitionManager; i dont understand the callback function i cant recive cmocrlayot class

my code :

-(void)  initializeRecognitionEngine
{

// Load the license data from file.
NSString* licenseDataFilePath = [[self pathToData] stringByAppendingPathComponent:@"ABBYY.License"];//@"license"];
NSFileHandle* licenseDataFile = [NSFileHandle fileHandleForReadingAtPath:licenseDataFilePath];
NSData* licenseData = [licenseDataFile readDataToEndOfFile];

// Intialize MobileOCR engine
NSArray* dataSources = [NSArray arrayWithObject:[CMocrDirectoryDataSource dataSourceWithDirectoryPath:[self pathToData]]];
CMocrLicense* license = [CMocrLicense licenseWithLicenseData:licenseData applicationId:@"iOS_ID"];
_mocrEngine = [CMocrEngine createSharedEngineWithDataSources:dataSources license:license];

if( _mocrEngine == nil ) {
    // Failed to create singleton instance of the CMocrEngine class.
    TMocrErrorCode errorCode;
    NSString* errorMessage;
    [CMocrEngine getLastError:&errorCode message:&errorMessage];
    NSLog(@"Error code: %@. Error message: %@", [ImageImporterViewController stringFromMocrErrorCode:errorCode], errorMessage);
}
_ocrConfiguration = nil;
_bcrConfiguration = nil;

} - (CMocrRecognitionConfiguration) ocrConfiguration { if( _ocrConfiguration == nil ) { NSSet recognitionLanguages = [NSSet setWithObjects:@"English", nil]; _ocrConfiguration = [[CMocrRecognitionConfiguration alloc] initWithImageResolution:300 imageProcessingOptions:0 recognitionMode:MRM_Full recognitionConfidenceLevel:MRCL_Level3 barcodeTypes:MBT_ANY1D | MBT_SQUARE2D defaultCodePage:MSCP_Utf8 unknownLetter:L'^' recognitionLanguages:recognitionLanguages]; } return _ocrConfiguration; }

asked 14 May '15, 14:00

Michael%20Sheinfeild's gravatar image

Michael Shei...
11


Dear Michael,

All available samples are included in the MSDK distributive, we have no other samples besides those.

We kindly ask you to read the «How to Use the iOS Wrapper» article from our Help file (Guided Tour→How to Use the iOS Wrapper). It describes how to add the library and the resources to your own project and how to use the library on iOS. Hope it will be helpful!

link

answered 19 May '15, 14:42

Anna%20Falevskaya's gravatar image

Anna Falevskaya ♦♦
715

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×43
×2

Asked: 14 May '15, 14:00

Seen: 1,195 times

Last updated: 19 May '15, 14:42

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal