xworker.net.sourceforge.tess4j.Tess4jActions.dml Maven / Gradle / Ivy
%1561083448151
@
sname=Tess4jActions
slabel=Tess4jActions
sdescriptors=xworker.lang.MetaDescriptor3
smany=true
seditCols=2
sinitialization=false
smodifier=public
sinheritDescription=false
snotXmlAttribute=false
sjson_isArray=false
sth_createIndex=true
sth_registThing=child|xworker.lang.actions.Actions
sth_registMyChilds=true
sth_registDisabled=false
sth_mark=false
@/@CreateTesseract
sname=createTesseract
sdescriptors=xworker.lang.MetaDescriptor3/@thing
sextends=xworker.lang.actions.SelfAction
smany=true
seditCols=2
sinitialization=false
sgroup=text.ocr.tess4j
smodifier=public
sinheritDescription=false
Sdescription=
#$@text#$@
创建Tesseract对象,通过Tesseract对象识别图像。
An object layer on top of TessAPI
, provides character recognition support for common image formats, and multi-page TIFF images beyond the uncompressed, binary TIFF format supported by Tesseract OCR engine. The extended capabilities are provided by the Java Advanced Imaging Image I/O Tools
.
Support for PDF documents is available through Ghost4J
, a JNA
wrapper for GPL Ghostscript
, which should be installed and included in system path.
Any program that uses the library will need to ensure that the required libraries (the .jar
files for jna
, jai-imageio
, and ghost4j
) are in its compile and run-time classpath
.
Invalid Memory Acess问题
目前所知是data目录的设置问题,比如目录是./data/tessdata/,3.x.x的版本要设置成./data/,4.x.x的版本要设置为/data/tessdata/,如还有错误可自行尝试。
#$@text#$@
snotXmlAttribute=false
sjson_isArray=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=CreateTesseract
@/@CreateTesseract/@actions
sname=actions
sdescriptors=xworker.lang.MetaDescriptor3/@actions
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=actions
@/@CreateTesseract/@actions/@run
sname=run
sisSynchronized=false
sthrowException=true
suseOtherAction=false
suseOuterJava=true
suseInnerJava=false
souterClassName=net.sourceforge.tess4j.Tess4jActions
smethodName=createTesseract
sdisableGlobalContext=false
sattributeTemplate=false
sinterpretationType=Action
svarScope=Global
screateLocalVarScope=false
ssaveReturn=false
sdebugLog=false
sdescriptors=xworker.lang.actions.Actions/@JavaAction
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=run
@/@CreateTesseract/@name
sname=name
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=name
@/@CreateTesseract/@label
sname=label
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=label
@/@CreateTesseract/@datapath
sname=datapath
ssize=60
sshowLabel=true
sreadOnly=false
sdefault=c:\\Program Files (x86)\\Tesseract-OCR\\tessdata\\
sinheritDescription=false
Sdescription=
#$@text#$@
Sets path to tessdata
.
注意:目录是包含tessdata的父目录,如d:/xxx/,那么包含d:/xxx/testdata/子目录。
#$@text#$@
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=datapath
@/@CreateTesseract/@language
sname=language
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=language
@/@CreateTesseract/@ocrEngineMode
sname=ocrEngineMode
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=ocrEngineMode
@/@CreateTesseract/@pageSegMode
sname=pageSegMode
sshowLabel=true
sreadOnly=false
sinheritDescription=false
Sdescription=
#$@text#$@
pagesegmode values are:
0 = Orientation and script detection (OSD) only.
1 = Automatic page segmentation with OSD.
2 = Automatic page segmentation, but no OSD, or OCR
3 = Fully automatic page segmentation, but no OSD. (Default)
4 = Assume a single column of text of variable sizes.
5 = Assume a single uniform block of vertically aligned text.
6 = Assume a single uniform block of text.
7 = Treat the image as a single text line.
8 = Treat the image as a single word.
9 = Treat the image as a single word in a circle.
10 = Treat the image as a single character.
#$@text#$@
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=pageSegMode
@/@CreateTesseract/@description
sname=description
sinputtype=html
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=description
@/@doOCRBufferedImage
sname=doOCRBufferedImage
sdescriptors=xworker.lang.MetaDescriptor3/@thing
sextends=xworker.lang.actions.SelfAction
smany=true
seditCols=2
sinitialization=false
sgroup=text.ocr.tess4j
smodifier=public
sinheritDescription=false
Sdescription=
#$@text#$@
从BufferedImage中识别字符串。
返回值:String
可以重写的方法:
- ITesseract getTesseract()
返回OCR引擎,如果为null,则在识别时新建一个。
- java.awt.BufferedImage getImage()
返回要识别的BufferedImage。
- java.awt.Rectangle getRect()
返回要识别的区域,如果为null那么识别整个图像。默认从rect属性获取,格式为x,y,width,height,如0,0,100,200,如果不是这个格式,那么通过UtilData获取。
#$@text#$@
snotXmlAttribute=false
sjson_isArray=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=doOCRBufferedImage
@/@doOCRBufferedImage/@actions
sname=actions
sdescriptors=xworker.lang.MetaDescriptor3/@actions
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=actions
@/@doOCRBufferedImage/@actions/@run
sname=run
sisSynchronized=false
sthrowException=true
suseOtherAction=false
suseOuterJava=true
suseInnerJava=false
souterClassName=net.sourceforge.tess4j.Tess4jActions
smethodName=doOCRBufferedImage
sdisableGlobalContext=false
sattributeTemplate=false
sinterpretationType=Action
svarScope=Global
screateLocalVarScope=false
ssaveReturn=false
sdebugLog=false
sdescriptors=xworker.lang.actions.Actions/@JavaAction
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=run
@/@doOCRBufferedImage/@actions/@getImage
sname=getImage
sattributeName=image
snotNull=false
sinterpretationType=Self
sattributeTemplate=false
schildsAttributeTemplate=false
svarScope=Local
sisSynchronized=false
sthrowException=true
suseOtherAction=false
screateLocalVarScope=false
ssaveReturn=false
sdisableGlobalContext=false
sdebugLog=false
sdescriptors=xworker.lang.actions.ActionUtil/@GetData
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=getImage
@/@doOCRBufferedImage/@actions/@run1
sname=getRect
sisSynchronized=false
sthrowException=true
suseOtherAction=false
suseOuterJava=true
suseInnerJava=false
souterClassName=net.sourceforge.tess4j.Tess4jActions
smethodName=getRect
sdisableGlobalContext=false
sattributeTemplate=false
sinterpretationType=Action
svarScope=Global
screateLocalVarScope=false
ssaveReturn=false
sdebugLog=false
sdescriptors=xworker.lang.actions.Actions/@JavaAction
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=run1
@/@doOCRBufferedImage/@actions/@getTesseract
sname=getTesseract
sattributeName=tesseract
snotNull=false
sinterpretationType=Self
sattributeTemplate=false
schildsAttributeTemplate=false
svarScope=Local
sisSynchronized=false
sthrowException=true
suseOtherAction=false
screateLocalVarScope=false
ssaveReturn=false
sdisableGlobalContext=false
sdebugLog=false
sdescriptors=xworker.lang.actions.ActionUtil/@GetData
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=getTesseract
@/@doOCRBufferedImage/@name
sname=name
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=name
@/@doOCRBufferedImage/@label
sname=label
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=label
@/@doOCRBufferedImage/@tesseract
sname=tesseract
ssize=50
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=tesseract
@/@doOCRBufferedImage/@image
sname=image
ssize=50
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=image
@/@doOCRBufferedImage/@rect
sname=rect
ssize=50
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=rect
@/@doOCRBufferedImage/@description
sname=description
sinputtype=html
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=description
@/@doOCRImageFile
sname=doOCRImageFile
sdescriptors=xworker.lang.MetaDescriptor3/@thing
sextends=xworker.lang.actions.SelfAction
smany=true
seditCols=2
sinitialization=false
sgroup=text.ocr.tess4j
smodifier=public
sinheritDescription=false
Sdescription=
#$@text#$@
从Image文件中识别字符串。
返回值:String
可以重写的方法:
- ITesseract getTesseract()
返回OCR引擎,如果为null,则在识别时新建一个。
- java.io.File getImageFile()
返回要识别的图片文件。
- java.awt.Rectangle getRect()
返回要识别的区域,如果为null那么识别整个图像。默认从rect属性获取,格式为x,y,width,height,如0,0,100,200,如果不是这个格式,那么通过UtilData获取。
#$@text#$@
snotXmlAttribute=false
sjson_isArray=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=doOCRImageFile
@/@doOCRImageFile/@actions
sname=actions
sdescriptors=xworker.lang.MetaDescriptor3/@actions
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=actions
@/@doOCRImageFile/@actions/@run
sname=run
sisSynchronized=false
sthrowException=true
suseOtherAction=false
suseOuterJava=true
suseInnerJava=false
souterClassName=net.sourceforge.tess4j.Tess4jActions
smethodName=doOCRImageFile
sdisableGlobalContext=false
sattributeTemplate=false
sinterpretationType=Action
svarScope=Global
screateLocalVarScope=false
ssaveReturn=false
sdebugLog=false
sdescriptors=xworker.lang.actions.Actions/@JavaAction
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=run
@/@doOCRImageFile/@actions/@run1
sname=getRect
sisSynchronized=false
sthrowException=true
suseOtherAction=false
suseOuterJava=true
suseInnerJava=false
souterClassName=net.sourceforge.tess4j.Tess4jActions
smethodName=getRect
sdisableGlobalContext=false
sattributeTemplate=false
sinterpretationType=Action
svarScope=Global
screateLocalVarScope=false
ssaveReturn=false
sdebugLog=false
sdescriptors=xworker.lang.actions.Actions/@JavaAction
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=run1
@/@doOCRImageFile/@actions/@getTesseract
sname=getTesseract
sattributeName=tesseract
snotNull=false
sinterpretationType=Self
sattributeTemplate=false
schildsAttributeTemplate=false
svarScope=Local
sisSynchronized=false
sthrowException=true
suseOtherAction=false
screateLocalVarScope=false
ssaveReturn=false
sdisableGlobalContext=false
sdebugLog=false
sdescriptors=xworker.lang.actions.ActionUtil/@GetData
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=getTesseract
@/@doOCRImageFile/@actions/@getImageFile
sname=getImageFile
sattributeName=imageFile
snotNull=false
sinterpretationType=Self
sattributeTemplate=false
schildsAttributeTemplate=false
svarScope=Local
sisSynchronized=false
sthrowException=true
suseOtherAction=false
screateLocalVarScope=false
ssaveReturn=false
sdisableGlobalContext=false
sdebugLog=false
sdescriptors=xworker.lang.actions.ActionUtil/@GetFile
sinheritDescription=false
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=getImageFile
@/@doOCRImageFile/@name
sname=name
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=name
@/@doOCRImageFile/@label
sname=label
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=label
@/@doOCRImageFile/@tesseract
sname=tesseract
ssize=50
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=tesseract
@/@doOCRImageFile/@image
sname=imageFile
sinputtype=file
ssize=60
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=image
@/@doOCRImageFile/@rect
sname=rect
ssize=50
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=rect
@/@doOCRImageFile/@description
sname=description
sinputtype=html
sshowLabel=true
sreadOnly=false
sinheritDescription=false
svalidateAllowBlank=true
LvalidateOnBlur=true
LallowDecimals=true
LallowNegative=true
snotXmlAttribute=false
sdescriptors=xworker.lang.MetaDescriptor3/@attribute
sth_createIndex=false
sth_registMyChilds=false
sth_registDisabled=false
sth_mark=false
sid=description