日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【机器视觉】 set_fuzzy_measure算子

發(fā)布時間:2024/4/24 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【机器视觉】 set_fuzzy_measure算子 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

00. 目錄

文章目錄

    • 00. 目錄
    • 01. 概述
    • 02. 簽名
    • 03. 描述
    • 04. 注意
    • 05. 參數
    • 06. 結果
    • 07. 附錄

01. 概述

set_fuzzy_measure - 指定一個模糊函數。

02. 簽名

set_fuzzy_measure( : : MeasureHandle, SetType, Function : )

03. 描述

set_fuzzy_measure指定在函數中傳遞的模糊函數。 指定的模糊函數使得fuzzy_measure_pos和fuzzy_measure_pairs / fuzzy_measure_pairing能夠評估和選擇檢測到的候選邊緣。 為此,不同邊緣特征的加權特征可以由一個函數來定義。 這種特定的特征被稱為模糊集合。 模糊集沒有指定的功能意味著不使用此功能進行最終邊緣評估。 將第二個模糊函數設置意味著放棄第一個定義的函數并將其替換為第二個函數。 以前定義的模糊函數可以通過reset_fuzzy_measure完全丟棄。

可以定義由SetType參數選擇的五種不同模糊集合類型的函數,一個集合的子類型是互斥的:

'contrast’將使用模糊函數來評估候選邊緣的幅度。 在提取邊緣對時,通過兩邊的模糊對比度評分的幾何平均來獲得模糊評估。

'position’的模糊函數評估由gen_measure_arc或gen_measure_rectangle2生成的每個候選邊緣到度量對象的參考點的距離。 參考點位于開始位置,而“position_center”或“position_end”將參考點設置為一維灰度值輪廓的中間或末端。 如果模糊位置評估取決于物體沿著輪廓的位置,‘position_first_edge’/‘position_last_edge’將參考點設置在第一個/最后提取的邊緣的位置處。 當提取邊緣對時,邊緣對的位置被兩邊的模糊位置分數的幾何平均值所引用。

與’position’相似,‘position_pair’計算每個邊對與measure對象的參考點之間的距離。 一個邊緣對的位置由兩個邊緣之間的中心點定義。 對象的參考點可以分別由’position_pair_center’,‘position_pair_end’和’position_first_pair’,'position_last_pair’來設置。 與’position’不同的是,該設置僅由fuzzy_measure_pairs / fuzzy_measure_pairing使用。

'size’表示一個模糊設置,該設置為以像素為單位評估一對的兩條邊的規(guī)定距離。 該集合僅由fuzzy_measure_pairs / fuzzy_measure_pairing使用。 通過以相應的模糊值0.0終止函數來指定大小的上限將加快fuzzy_measure_pairs / fuzzy_measure_pairing,因為不需要考慮所有可能的對。

'gray’設置模糊函數來對一對的兩個邊緣之間的平均投影灰度值進行加權。 該集合僅由fuzzy_measure_pairs / fuzzy_measure_pairing使用。

一個模糊函數被定義為一個分段線性函數,由至少兩對值按升序按x值排序。 x值表示邊緣特征,并且必須位于設置類型的參數空間內,即,在’contrast’和’gray’特征的情況下,例如在0.0≤x≤255.0的范圍內的byte圖像。 'size’x必須滿足0.0 <= x,而 'position’x可以是任何實數。 模糊函數的y值表示相應特征值的權重,并且必須滿足0.0 <= y <= 1.0。 在由最小和最大x值定義的函數間隔之外,間隔邊界外的y值仍連續(xù)。 這樣的模糊函數可以由create_funct_1d_pairs生成。

如果定義了多個集合,則fuzzy_measure_pos / fuzzy_measure_pairs / fuzzy_measure_pairing通過每個集合的權重的幾何中間產生整體模糊加權。

原文描述

set_fuzzy_measure specifies a fuzzy function passed in Function. The specified fuzzy functions enable fuzzy_measure_pos and fuzzy_measure_pairs / fuzzy_measure_pairing to evaluate and select the detected edge candidates. For this purpose, weighting characteristics for different edge features can be defined by one function each. Such a specified feature is called fuzzy set. Specifying no function for a fuzzy set means not to use this feature for the final edge evaluation. Setting a second fuzzy function to a set means to discard the first defined function and replace it by the second one. A previously defined fuzzy function can be discarded completely by reset_fuzzy_measure.

For an explanation of the concept of 1D measuring see the introduction of chapter 1D Measuring.

Functions for five different fuzzy set types selected by the SetType parameter can be defined, the sub types of a set being mutual exclusive:

‘contrast’ will use the fuzzy function to evaluate the amplitudes of the edge candidates. When extracting edge pairs, the fuzzy evaluation is obtained by the geometric average of the fuzzy contrast scores of both edges.

The fuzzy function of ‘position’ evaluates the distance of each edge candidate to the reference point of the measure object, generated by gen_measure_arc or gen_measure_rectangle2. The reference point is located at the beginning whereas ‘position_center’ or ‘position_end’ sets the reference point to the middle or the end of the one-dimensional gray value profile instead. If the fuzzy position evaluation depends on the position of the object along the profile, ‘position_first_edge’ / ‘position_last_edge’ sets the referece point at the position of the first/last extracted edge. When extracting edge pairs the position of a pair is referenced by the geometric average of the fuzzy position scores of both edges.

Similar to ‘position’, ‘position_pair’ evaluates the distance of each edge pair to the reference point of the measure object. The position of a pair is defined by the center point between both edges. The object’s reference can be set by ‘position_pair_center’, ‘position_pair_end’ and ‘position_first_pair’, ‘position_last_pair’, respectively. Contrary to ‘position’, this set is only used by fuzzy_measure_pairs/fuzzy_measure_pairing.

‘size’ denotes a fuzzy set that evaluates the normed distance of the two edges of a pair in pixels. This set is only used by fuzzy_measure_pairs/fuzzy_measure_pairing. Specifying an upper bound for the size by terminating the function with a corresponding fuzzy value of 0.0 will speed up fuzzy_measure_pairs / fuzzy_measure_pairing because not all possible pairs need to be considered.

‘gray’ sets a fuzzy function to weight the mean projected gray value between two edges of a pair. This set is only used by fuzzy_measure_pairs / fuzzy_measure_pairing.

A fuzzy function is defined as a piecewise linear function by at least two pairs of values, sorted in an ascending order by their x value. The x values represent the edge feature and must lie within the parameter space of the set type, i.e., in case of ‘contrast’ and ‘gray’ feature and, e.g., byte images within the range 0.0 <= x <= 255.0. In case of ‘size’ x has to satisfy 0.0 <= x whereas in case of ‘position’ x can be any real number. The y values of the fuzzy function represent the weight of the corresponding feature value and have to satisfy the range of 0.0 <= y <= 1.0. Outside of the function’s interval, defined by the smallest and the greatest x value, the y values of the interval borders are continued constantly. Such Fuzzy functions can be generated by create_funct_1d_pairs.

If more than one set is defined, fuzzy_measure_pos / fuzzy_measure_pairs / fuzzy_measure_pairing yield the overall fuzzy weighting by the geometric middle of the weights of each set.

執(zhí)行信息

●  多線程類型:可重入(與非獨占算子并行運行)。
●  多線程范圍:全局(可以從任何線程調用)。
●  不并行處理。

該算子修改以下輸入參數的狀態(tài):

MeasureHandle

如果沒有全局同步,此參數的值可能不會在多個線程之間共享。

04. 注意

05. 參數

SetType (input_control)   string → (string)
  模糊集合的選擇。: ‘contrast’
  List of values: ‘contrast’, ‘gray’, ‘position’, ‘position_center’, ‘position_end’, ‘position_first_edge’, ‘position_first_pair’, ‘position_last_edge’, ‘position_last_pair’,   ‘position_pair_center’, ‘position_pair_end’, ‘size’

Function (input_control)    function_1d → (real / integer)
  模糊函數。

06. 結果

HDevelop例程

inspect_bottle_label_360_degree.hdev 將一個瓶子的四個圖像組合成拼接圖像,顯示瓶子的展開標簽
fuzzy_measure_switch.hdev     用一個模糊度量對象確定一個開關引腳的寬度和距離

程序示例

* how to use a fuzzy function * ... gen_measure_rectangle2 (50, 100, 0, 200, 100, 512, 512, 'nearest_neighbor', \MeasureHandle) * create a generalized fuzzy function to evaluate edge pairs * * (30% uncertainty). create_funct_1d_pairs ([0.7,1.0,1.3], [0.0,1.0,0.0], SizeFunction) * and transform it to expected size of 13.45 pixels transform_funct_1d (SizeFunction, [1.0,0.0,13.45,0.0], TransformedFunction) set_fuzzy_measure (MeasureHandle, 'size', TransformedFunction)fuzzy_measure_pairs (Image, MeasureHandle, 1, 30, 0.5, 'all', RowEdgeFirst, \ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, \ColumnEdgeSecond, AmplitudeSecond, RowEdgeCenter, \ColumnEdgeCenter, FuzzyScore, IntraDistance, \InterDistance)

07. 附錄

7.1 機器視覺博客匯總
網址:https://dengjin.blog.csdn.net/article/details/116837497

總結

以上是生活随笔為你收集整理的【机器视觉】 set_fuzzy_measure算子的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。