zoukankan      html  css  js  c++  java
  • Halcon算子翻译——fuzzy_measure_pairs

    名称

    fuzzy_measure_pairs - 提取垂直于矩形或环形弧的直边对。

    用法

      fuzzy_measure_pairs(Image : : MeasureHandle, Sigma, AmpThresh, FuzzyThresh, Transition : RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, ColumnEdgeSecond, AmplitudeSecond, RowEdgeCenter, ColumnEdgeCenter, FuzzyScore, IntraDistance, InterDistance)

    描述

      fuzzy_measure_pairs用于提取垂直于矩形或环形弧长轴的直边对。 与measure_pairs不同的是,它还使用模糊函数来判断和选择边缘对。

      提取算法与fuzzy_measure_pos相同。 另外,相邻的边被分组成对。 要提取彼此相交或包含的对,请使用fuzzy_measure_pairing。

      如果Transition ='positive',则在RowEdgeFirst和ColumnEdgeFirst中将返回沿矩形或圆弧的长轴方向的暗到明转换的边缘点。 在这种情况下,在RowEdgeSecond和ColumnEdgeSecond中将返回具有明暗过渡的相应边。 如果Transition ='negative',则效果完全相反。 如果Transition =“all”,则首先检测到的边将定义RowEdgeFirst和ColumnEdgeFirst的转换。 即,取决于测量对象的定位,返回具有明暗过渡的边缘对或具有暗明过渡的边缘对。 这适合于例如测量具有相对于背景的不同亮度的物体。

      在提取了子像素边缘位置之后,边缘是成对的。 配对算法对边缘进行分组,从而禁止边缘对待交织和包含。 边缘对的特征由模糊函数评估,可以通过set_fuzzy_measure或set_fuzzy_measure_norm_pair来设置。(在候选边缘对中) 选择哪个边缘对可以用参数FuzzyThresh来确定,该参数构成了所有模糊集上权重的阈值,即所定义的模糊函数的权重的几何平均值。(Which edge pairs are selected can be determined with the parameter FuzzyThresh, which constitutes a threshold on the weight over all fuzzy sets, i.e., the geometric mean of the weights of the defined fuzzy functions.)

      选定的边将作为单个点返回,这些点位于矩形或环形弧的长轴上。 相应的边缘振幅在AmplitudeFirst和AmplitudeSecond中返回,返回模糊分数到FuzzyScore。 另外,每个边缘对之间的距离在IntraDistance中返回,连续边缘对之间的距离在InterDistance中返回。 这里,IntraDistance [i]对应于EdgeFirst [i]和EdgeSecond [i]之间的距离,而InterDistance [i]对应于EdgeSecond [i]和EdgeFirst [i + 1]之间的距离,即,元组InterDistance包含(边缘对元组长度-1)个元素。

    注意

      只有在边缘是直的并且垂直于矩形或环形弧长轴的情况下,fuzzy_measure_pairs返回的结果才有意义。 因此,例如,它不应该用于从曲面对象中提取边缘。 此外,用户应确保矩形或环形弧尽可能接近垂直于图像中的边缘。 此外,西格玛不能大于约 0.5 *Length1(对于Length1请参见gen_measure_rectangle2)。

    并行

    ●  多线程类型:可重入(与非独占算子并行运行)。

    ●  多线程范围:全局(可以从任何线程调用)。

    ●  不并行处理。

    参数

    Image (input_object)   singlechannelimage → object (byte / uint2 / real)
      输入图像。


    MeasureHandle (input_control)    measure_id → (integer)
      measure对象句柄。


    Sigma (input_control)    number → (real)
      高斯模糊的Sigma。
      Default value: 1.0
      Suggested values: 0.4, 0.6, 0.8, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 10.0
      Typical range of values: 0.4 ≤ Sigma ≤ 100 (lin)
      Minimum increment: 0.01
      Recommended increment: 0.1
      Restriction: Sigma >= 0.4


    AmpThresh   (input_control) number → (real)
      最小边缘幅度。
      Default value: 30.0
      Suggested values: 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 90.0, 110.0
      Typical range of values: 1 ≤ AmpThresh ≤ 255 (lin)
      Minimum increment: 0.5
      Recommended increment: 2


    FuzzyThresh   (input_control) number → (real)
      最小模糊值。
      Default value: 0.5
      Suggested values: 0.1, 0.3, 0.5, 0.7, 0.9
      Typical range of values: 0.0 ≤ FuzzyThresh ≤ 1.0 (lin)
      Recommended increment: 0.1


    Transition   (input_control) string → (string)
      选择边缘对的第一个灰度值转换。
      Default value: 'all'
      List of values: 'all', 'negative', 'positive'


    RowEdgeFirst   (output_control) point.y-array → (real)
      边缘对的第一个边缘点的Row坐标。


    ColumnEdgeFirst   (output_control) point.x-array → (real)
      边缘对的第一个边缘点的Column坐标。


    AmplitudeFirst   (output_control) real-array → (real)
      边缘对第一条边的边缘幅度(带符号)。


    RowEdgeSecond   (output_control) point.y-array → (real)
      边缘对的第二个边缘点的Row坐标。


    ColumnEdgeSecond   (output_control) point.x-array → (real)
      边缘对的第二个边缘点的Column坐标。


    AmplitudeSecond   (output_control) real-array → (real)
      边缘对第二条边的边缘幅度(带符号)。


    RowEdgeCenter   (output_control) point.y-array → (real)
      边缘对的中心的Row坐标。


    ColumnEdgeCenter   (output_control) point.x-array → (real)
      边缘对的中心的Column坐标。


    FuzzyScore   (output_control) real-array → (real)
      边缘对的模糊评估分数。


    IntraDistance   (output_control) real-array → (real)
      边缘对内部的距离。


    InterDistance   (output_control) real-array → (real)
      连续边缘对之间的距离。

    结果

    如果参数值正确,则算子fuzzy_measure_pairs将返回值2(H_MSG_TRUE)。 否则会引发异常。

    Possible Predecessors

    gen_measure_rectangle2, gen_measure_arc, set_fuzzy_measure

    Possible Successors

    close_measure

    备选算子

    edges_sub_pix, fuzzy_measure_pairing, measure_pairs

    See also

    fuzzy_measure_pos, measure_pos

    模块

    1D Metrology

    HDevelop例程

    fuzzy_measure_switch.hdev   用一个模糊measure对象确定一个开关引脚的宽度和距离
    fuzzy_measure_pin.hdev        使用模糊measure来测量IC的引脚

  • 相关阅读:
    codeforces C. Fixing Typos 解题报告
    codeforces B. The Fibonacci Segment 解题报告
    codeforces B. Color the Fence 解题报告
    codeforces B. Petya and Staircases 解题报告
    codeforces A. Sereja and Bottles 解题报告
    codeforces B. Levko and Permutation 解题报告
    codeforces B.Fence 解题报告
    tmp
    API 设计 POSIX File API
    分布式跟踪的一个流行标准是OpenTracing API,该标准的一个流行实现是Jaeger项目。
  • 原文地址:https://www.cnblogs.com/xhiong/p/fuzzy_measure_pairs.html
Copyright © 2011-2022 走看看