[tesseract-ocr] push by zde...@gmail.com - Add paragraph info to C-API(fix issue 1388) on 2014-12-07 13:07 GMT

6 views
Skip to first unread message

tesser...@googlecode.com

unread,
Dec 7, 2014, 8:08:10 AM12/7/14
to tesserac...@googlegroups.com
Revision: 4da712d04db9
Author: Zdenko Podobný <zde...@gmail.com>
Date: Sun Dec 7 13:07:14 2014 UTC
Log: Add paragraph info to C-API(fix issue 1388)

https://code.google.com/p/tesseract-ocr/source/detail?r=4da712d04db9

Modified:
/api/capi.cpp
/api/capi.h

=======================================
--- /api/capi.cpp Tue Oct 14 20:46:11 2014 UTC
+++ /api/capi.cpp Sun Dec 7 13:07:14 2014 UTC
@@ -666,6 +666,14 @@
{
handle->Orientation(orientation, writing_direction, textline_order,
deskew_angle);
}
+
+TESS_API void TESS_CALL TessPageIteratorParagraphInfo(TessPageIterator*
handle, TessParagraphJustification* justification,
+ bool *is_list_item,
+ bool *is_crown,
+ int *first_line_indent)
+{
+ handle->ParagraphInfo(justification, is_list_item, is_crown,
first_line_indent);
+}

TESS_API void TESS_CALL TessResultIteratorDelete(TessResultIterator*
handle)
{
=======================================
--- /api/capi.h Tue Oct 14 20:46:11 2014 UTC
+++ /api/capi.h Sun Dec 7 13:07:14 2014 UTC
@@ -53,6 +53,7 @@
typedef tesseract::TruthCallback TessTruthCallback;
typedef tesseract::CubeRecoContext TessCubeRecoContext;
typedef tesseract::Orientation TessOrientation;
+typedef tesseract::ParagraphJustification TessParagraphJustification;
typedef tesseract::WritingDirection TessWritingDirection;
typedef tesseract::TextlineOrder TessTextlineOrder;
typedef PolyBlockType TessPolyBlockType;
@@ -77,6 +78,7 @@
PT_TABLE, PT_VERTICAL_TEXT,
PT_CAPTION_TEXT, PT_FLOWING_IMAGE, PT_HEADING_IMAGE,
PT_PULLOUT_IMAGE, PT_HORZ_LINE,
PT_VERT_LINE, PT_NOISE, PT_COUNT } TessPolyBlockType;
typedef enum TessOrientation { ORIENTATION_PAGE_UP,
ORIENTATION_PAGE_RIGHT, ORIENTATION_PAGE_DOWN, ORIENTATION_PAGE_LEFT }
TessOrientation;
+typedef enum TessParagraphJustification { JUSTIFICATION_UNKNOWN,
JUSTIFICATION_LEFT, JUSTIFICATION_CENTER, JUSTIFICATION_RIGHT }
TessParagraphJustification;
typedef enum TessWritingDirection { WRITING_DIRECTION_LEFT_TO_RIGHT,
WRITING_DIRECTION_RIGHT_TO_LEFT, WRITING_DIRECTION_TOP_TO_BOTTOM }
TessWritingDirection;
typedef enum TessTextlineOrder { TEXTLINE_ORDER_LEFT_TO_RIGHT,
TEXTLINE_ORDER_RIGHT_TO_LEFT, TEXTLINE_ORDER_TOP_TO_BOTTOM }
TessTextlineOrder;
typedef struct ETEXT_DESC ETEXT_DESC;
@@ -335,6 +337,9 @@
TessWritingDirection*
writing_direction, TessTextlineOrder* textline_order,
float* deskew_angle);

+TESS_API void TESS_CALL TessPageIteratorParagraphInfo(TessPageIterator*
handle, TessParagraphJustification* justification,
+ bool *is_list_item,
bool *is_crown, int *first_line_indent);
+
/* Result iterator */

TESS_API void TESS_CALL TessResultIteratorDelete(TessResultIterator*
handle);
Reply all
Reply to author
Forward
0 new messages