I have a working iOS code using tesseract. I would like to create html using the hocr config option. I cannot find an example of how to generate html programmatically. Is there any sample code/tutorial around? I'm using Xcode 5 and the latest Tesseract-ios.
- (NSString *)OCRPage:(NSString )imagePath { //NSLog(@"imagePath: %@", imagePath); Tesseract tesseract = [[Tesseract alloc] initWithDataPath:@"tessdata" language:@"eng"]; [tesseract setImage:[UIImage imageNamed:imagePath]]; [tesseract recognize];
//NSLog(@"%@", [tesseract recognizedText]);
NSString *textData=[tesseract recognizedText];
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, [tesseract recognizedText]);
return textData;}
Also, the use of the config file is unclear. I don't have a configs directory off of the tesseractdata path.
--
--
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to tesser...@googlegroups.com
To unsubscribe from this group, send email to
tesseract-oc...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en
---
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[tesseract setVariableValue:@"TRUE" forKey:@"tessedit_create_hocr"];
You received this message because you are subscribed to a topic in the Google Groups "tesseract-ocr" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tesseract-ocr/pzK-sH4YLO8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tesseract-oc...@googlegroups.com.