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

歡迎訪問 生活随笔!

生活随笔

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

编程问答

【机器视觉】 measure_thresh算子

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

00. 目錄

文章目錄

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

01. 概述

measure_thresh - 沿矩形或環形弧提取具有特定灰度值的點。

02. 簽名

measure_thresh(Image : : MeasureHandle, Sigma, Threshold, Select : RowThresh, ColumnThresh, Distance)

03. 描述

measure_thresh提取一維灰度值分布圖內的灰度值等于指定的閾值Threshold的點。 將灰度值輪廓投影到與參數MeasureHandle一起傳遞的度量矩形的長軸上,因此在灰度值輪廓內計算的閾值點對應于確定圖像坐標上的矩形長軸。算子結果RowThresh和ColumnThresh返回這些坐標。

如果灰度值輪廓與閾值線相交數次,則參數Select將確定要返回哪些值。 可能的設置是“first”,“last”,“first_last”(第一個和最后一個)或“all”。 對于最后兩種情況,Distance中返回計算點之間的距離。

通過平均所有線段的灰度值來創建灰度值輪廓,所述線段由度量矩形定義如下:

1.分段垂直于矩形的長軸,

2.它們有一個到矩形中心的整數距離,

3.線段限定在矩形內。

對于每一個線段,計算與長軸具有整數距離的所有點的灰度值的平均值。 由于測量矩形相對于圖像坐標存在平移和旋轉,輸入圖像Image通常在亞像素位置被采樣。

由于這涉及可以在多個投影中重復使用的一些計算,所以使用算子gen_measure_rectangle2預先執行一次這些計算。 在這里,測量對象MeasureHandle被生成,并且可以選擇不同的插值方案。

原文描述

measure_thresh extracts points for which the gray value within an one-dimensional gray value profile is equal to the specified threshold Threshold. The gray value profile is projected onto the major axis of the measure rectangle which is passed with the parameter MeasureHandle, so the threshold points calculated within the gray value profile correspond to certain image coordinates on the rectangle’s major axis. These coordinates are returned as the operator results in RowThresh and ColumnThresh.

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

If the gray value profile intersects the threshold line for several times, the parameter Select determines which values to return. Possible settings are ‘first’, ‘last’, ‘first_last’ (first and last) or ‘all’. For the last two cases Distance returns the distances between the calculated points.

The gray value profile is created by averaging the gray values along all line segments, which are defined by the measure rectangle as follows:

The segments are perpendicular to the major axis of the rectangle,

they have an integer distance to the center of the rectangle,

the rectangle bounds the segments.

For every line segment, the average of the gray values of all points with an integer distance to the major axis is calculated. Due to translation and rotation of the measure rectangle with respect to the image coordinates the input image Image is in general sampled at subpixel positions.

Since this involves some calculations which can be used repeatedly in several projections, the operator gen_measure_rectangle2 is used to perform these calculations only once in advance. Here, the measure object MeasureHandle is generated and different interpolation schemes can be selected.

執行信息

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

04. 注意

只有邊緣是直的并垂直于矩形或弧的長軸,measure_thresh返回的結果才有意義。 因此它不應該用于從曲面對象中提取邊緣。 此外用戶應確保矩形或弧線盡可能接近垂直于圖像中的邊緣。 此外,西格瑪不能大于約0.5 * Length1(對于Lenth1請參見gen_measure_rectangle2)。

應該記住,為了效率的原因,measure_thresh會忽略Image的ROI域。 如果圖像中的特定區域應該從measurement中排除,則應該生成具有適當修改的參數的新measure對象。

05. 參數

Image (input_object)   單通道圖像 → object (byte / uint2 / real)
  輸入圖像。

MeasureHandle (input_control)    measure_id → (integer)
  Measure對象句柄。

Sigma (input_control)    number → (real)
高斯模糊Sigma。

Default value: 1.0
Suggested values: 0.0, 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.0

Threshold (input_control)    number → (real)
閾值。
Default value: 128.0
Typical range of values: 0 ≤ Threshold ≤ 255 (lin)
Minimum increment: 0.5
Recommended increment: 1

Select (input_control)    string → (string)
要選擇的點。
Default value: ‘all’
List of values: ‘all’, ‘first’, ‘first_last’, ‘last’

RowThresh (output_control)    point.y-array → (real)
具有閾值的點的Row坐標。

ColumnThresh (output_control)    point.x-array → (real)
具有閾值的點的Column坐標。

Distance (output_control)    real-array → (real)
連續點之間的距離。

06. 結果

如果參數值正確,則算子measure_thresh返回值2(H_MSG_TRUE)。 否則,會引發異常。

HDevelop例程

程序示例

07. 附錄

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

總結

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

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