←选择平台

IOcrZoneCollection接口

总结
包含的区域IOcrPage
语法
c#
VB
objective - c
c++
Java
公共接口IOcrZoneCollection: ICollection <OcrZone>,IEnumerable <OcrZone>,IEnumerable, IList <OcrZone>
公共接口IOcrZoneCollection继承了System.Collections.Generic。System.Collections.Generic ICollection (OcrZone)。System.Collections.Generic IEnumerable (OcrZone)。System.Collections.IEnumerable IList (OcrZone)
@接口LTOcrZoneCollection: NSObject < NSFastEnumeration >
公共OcrZoneCollection实现了< OcrZone >列表
公共接口IOcrZoneCollection:公共System.Collections.Generic。System.Collections.Generic ICollection < OcrZone >。System.Collections.Generic IEnumerable < OcrZone >。System.Collections.IEnumerable IList < OcrZone >
讲话

IOcrZoneCollection目前区域添加到一个OCR页面。您可以访问的实例IOcrZoneCollection使用IOcrPage通过IOcrPage.Zones财产。

IOcrZoneCollection接口标准实现。net ICollection < T >, IList < T >,和IEnumerable < T >接口,因此,您可以使用这些接口的成员添加、删除,设置和遍历页面中的不同区域。

工作区域的页面,你可以第一个电话AutoZone。这将启动页面布局分解过程和引擎将填补IOcrPage.Zones财产与不同的区域。然后,您可以检查或修改的各个不同的区域IOcrZoneCollection属性。例如,使用IOcrZoneCollection。添加添加新区域和IOcrZoneCollection。删除删除区域。您可以使用IOcrZoneCollection。计算得到区目前在页面的数量。

修改区域,使用IOcrZoneCollection。项目的OcrZone对象感兴趣,通过IOcrZoneCollection.Item修改区然后把它回来。注意,因为OcrZone是一个结构(值类型),您必须使用setter。下面的代码片段说明了如何改变ocrPage的区域类型的第四区域:

c#
/ /记住,该指数是从零开始的,所以4区索引3OcrZone区= ocrPage.Zones [3];/ /防止该区域被认出来区。ZoneType = OcrZoneType.Graphic;ocrPage。区[3]=区;

当添加或更新区域,你应该直接初始化OcrZone.BoundsOcrZone.ZoneType区域的属性,因为他们不会承担他们的默认值。

你不应该修改OcrZone.Id财产。当添加区域,离开这个值默认为0。

OcrZone.ZoneType属性的更新区域应该是下列之一:OcrZoneType.Text,OcrZoneType.TableOcrZoneType.Graphics

更新区域的首选方法是显示在上面的代码片段中,第一个得到你感兴趣的区域,更新它,回到集合。

是你的责任来指定一个有效的识别module-filling方法对。否则任何错误的区域将没有识别的结果。有关更多信息,请参考OCR识别模块的概述

调用AutoZone明确的区域吗IOcrPage.Zones收集和再填充的区域发现引擎。

例子

为一个例子,请参考OcrZoneIOcrPage.AutoZone

需求

目标平台

Leadtools。Ocr组装
188金宝搏的网址客服|支持|联系我们|知识产权的通知
©1991 - 2021领先的技术公司。保留所有权利。