zoukankan      html  css  js  c++  java
  • OCR

    troubleshoot:

    1.为什么看起来总是把一个字符认成两个呢? (Fr NI)
    解答: 这可能是由于最小字符间距设得太小导致的,所以会出现M和N有时候被认成两个字符的情况。需要采取一些步骤来解决这个问题。
    a.得到一张更高精度或放大后的文本文件的图像。
    b.在OCR训练软件中打开图像,并设置最小字符间距(在size and spacing 选择下面)为6,这样所有的字符应该都可以被辨认了。

    ---字符间距可以使用ROI在image上测量出来,但打开图像显示框的 visible items->image information

    (http://digital.ni.com/public.nsf/allkb/C1C6F5CADE35ECE086256F5B002A3092)

    2.字符总是各一个或几个才能识别一个, 并有时报错-1074395560, (invalid object index)需要设置属性节点,猛啃下表and

    C:\Program Files (x86)\National Instruments\Vision\Documentation\NIVisionConcepts.chm

    Machine Vision>>Optical Character Recognition

    ni:http://zone.ni.com/reference/en-XX/help/372916M-01/nivisionconcepts/ocr_concepts_and_terminology/

    3.如果程序结构需识别不同字体,字号,或字间距, 需对应不同的*abc文件, 也即只要对应的OCR 属性vi的输入参数更改,则也对应一个新的abc文件.

    Acceptance Level (0)

    The minimum acceptance level at which an object is considered a trained character. The range of valid values for this property is 0 to 1000. The default value is 700.

    Min Char Size (1)

    The minimum object size, in pixels, at which an object is a potential identifiable character. The minimum value allowed for this property is 1. The value of this property must not exceed Max Char Size. The default is 20 pixels.

    Max Char Size (2)

    The maximum object size, in pixels, at which an object is a potential identifiable character. Set this value to 65536, which is also the default value, to specify that all values greater than Min Char Size are acceptable. The value of this property must not be less than Min Char Size.

    Min Char Spacing (3)

    The minimum amount of space, in pixels, that can be between characters. This value must not be less than the Max Horiz Element Spacing. The default value is 1.

    Max Horiz Element Spacing (4)

    The maximum horizontal spacing, in pixels, between the elements that are combined to form a single character. For stroke characters, set this value to 1 or 2. For segment characters or pin stamp characters, set this value to 5 or higher. This value cannot exceed the actual character spacing value specified by the Min Char Spacing property. The horizontal spacing value is required to ensure that OCR correctly trains and reads characters that consist of several elements. The minimum value allowed for this property is 0. The default value is 1.

    Max Vert Element Spacing (5)

    The maximum vertical spacing, in pixels, between the elements that are combined to form a single character. The default value is 0, which specifies that any object in the ROI should be considered part of a valid object.

    Min Bounding Rect Width (6)

    The minimum width, in pixels, of a character bounding rectangle. The value of this property cannot exceed Max Bounding Rect Width. The minimum value allowed for this property, which is also the default value, is 1.

    Max Bounding Rect Width (7)

    The maximum width, in pixels, of a character bounding rectangle. Set this value to 65536, which is also the default value, to specify that all values greater than Min Bounding Rect Width are acceptable. The value of this property must not be less than Min Bounding Rect Width.

    Min Bounding Rect Height (8)

    The minimum height, in pixels, of a character bounding rectangle. The value of this property cannot exceed Max Bounding Rect Height. The minimum value allowed for this property, which is also the default value, is 1.

    Max Bounding Rect Height (9)

    The maximum height, in pixels, of a character bounding rectangle. Set this value to 65536, which is also the default value, to specify that all values greater than Min Bounding Rect Height are acceptable. The value of this property must not be less than Min Bounding Rect Height.

    Read Strategy (10)

    The read strategy determines how closely OCR analyzes images in the reading process to match objects with trained characters. The following list includes valid values:

    • Aggressive—Use few criteria to determine character match.
    • Conservative—Use extensive criteria to determine character match.

    The default value is Aggressive.

    Aspect Ratio (11)

    The maximum aspect ratio variation percentage that the IMAQ OCR Read Text 3 VI allows when it identifies characters. The minimum value for this property is 100, which specifies that the identified object must match the trained character exactly in size and height/width ratio. The default aspect ratio is 400.

    Number Of Erosions (12)

    The number of erosions to perform to remove small objects. After performing the specified number of erosions, OCR restores remaining objects to their original uneroded size. The default value is 0.

    Read Resolution (13)

    The level of character criteria that OCR uses to determine if an object matches a trained character. The default is low resolution.

    Size of Char Set (14)

    The number of characters in the trained character set. This property is read-only. 

    备注:

  • 相关阅读:
    【转】SqlServer Text类型字段超过8000字处理
    uniapp项目运行时一直发http://localhost:8080/sockjs-node/info?t=1462183700002请求
    【转】chrome 浏览器调用 ocx 插件
    【转】javascript检测浏览器插件
    【转】web错误代码ERR_BLOCKED_BY_RESPONSE
    我是如何将Sublime Text 4 设置成中文版
    【转】用好 Vue 中 v-for 循环的 7 种方法
    【转】JavaScript console.log %c %o %s %d %f
    [JavaScript]UMD模块
    leetcode-课程表I和课程表II
  • 原文地址:https://www.cnblogs.com/winkle/p/2979656.html
Copyright © 2011-2022 走看看