File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ - (id) initWithLanguage:(NSString *)language
4949- (void )main
5050{
5151 @autoreleasepool {
52+ // Analyzing the layout must be performed before recognition
53+ [self .tesseract analyseLayout ];
54+
5255 [self .tesseract recognize ];
5356 }
5457}
Original file line number Diff line number Diff line change @@ -146,6 +146,15 @@ extern NSInteger const kG8MaxCredibleResolution;
146146 */
147147- (NSString *)recognizedHOCRForPageNumber : (int )pageNumber ;
148148
149+ /* *
150+ * Run Tesseract's page analysis on the target image.
151+ *
152+ * @note You must have a file called "osd.traineddata" in the "tessdata"
153+ * folder to use this method. You can download this file from:
154+ * https://code.google.com/p/tesseract-ocr/downloads/list
155+ */
156+ - (void )analyseLayout ;
157+
149158/* *
150159 * The result of Tesseract's orientation analysis of the target image. See
151160 * `G8Orientation` in G8Constants.h for the possible orientations.
You can’t perform that action at this time.
0 commit comments