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

歡迎訪問 生活随笔!

生活随笔

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

编程问答

【机器视觉】 gen_measure_rectangle2算子

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

00. 目錄

文章目錄

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

01. 概述

gen_measure_rectangle2 - 準備提取垂直于矩形的直邊。

02. 簽名

gen_measure_rectangle2( : : Row, Column, Phi, Length1, Length2, Width, Height, Interpolation : MeasureHandle)

03. 描述

? gen_measure_rectangle2準備提取垂直于矩形長軸的直邊。 矩形的中心在(Row,Column),Phi為矩形主軸的角度,Lenth1和Lenth2為兩軸的長度,即矩形兩邊長度的一半。

在算子measure_pos的文檔中描述了邊緣提取算法。 如上所述,可以使用不同類型的插值來計算一維灰度值分布。 對于Interpolation = ‘nearest_neighbor’,測量中的灰度值是從最接近的像素的灰度值,即通過常數插值獲得的。 對于Interpolation = ‘bilinear’,使用雙線性插值,而對于Interpolation = ‘bicubic’,則使用雙三次插值。

要在實際測量中以最佳速度運行,所有可用于多次測量的計算都已在算子gen_measure_rectangle2中執行。 為此,在MeasureHandle中構造并返回一個優化的數據結構,即所謂的measure對象。 要在其中執行測量的圖像的大小必須在參數’Width’和’Height’中指定。

系統參數“int_zooming”(見set_system)會影響用于構建measure對象的計算的準確性和速度。 如果’int_zooming’設置為’true’,則內部計算使用定點算術執行,導致執行時間縮短。 但是,這種模式下的幾何精度略低。 如果將“int_zooming”設置為“false”,則使用浮點運算執行內部計算,從而導致最大的幾何精度,但也會顯著增加執行時間。

原文描述

gen_measure_rectangle2 prepares the extraction of straight edges which lie perpendicular to the major axis of a rectangle. The center of the rectangle is passed in the parameters Row and Column, the direction of the major axis of the rectangle in Phi, and the length of the two axes, i.e., half the diameter of the rectangle, in Length1 and Length2.

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

The edge extraction algorithm is described in the documentation of the operator measure_pos. As discussed there, different types of interpolation can be used for the calculation of the one-dimensional gray value profile. For Interpolation = ‘nearest_neighbor’, the gray values in the measurement are obtained from the gray values of the closest pixel, i.e., by constant interpolation. For Interpolation = ‘bilinear’, bilinear interpolation is used, while for Interpolation = ‘bicubic’, bicubic interpolation is used.

To perform the actual measurement at optimal speed, all computations that can be used for multiple measurements are already performed in the operator gen_measure_rectangle2. For this, an optimized data structure, a so-called measure object, is constructed and returned in MeasureHandle. The size of the images in which measurements will be performed must be specified in the parameters Width and Height.

The system parameter ‘int_zooming’ (see set_system) affects the accuracy and speed of the calculations used to construct the measure object. If ‘int_zooming’ is set to ‘true’, the internal calculations are performed using fixed point arithmetic, leading to much shorter execution times. However, the geometric accuracy is slightly lower in this mode. If ‘int_zooming’ is set to ‘false’, the internal calculations are performed using floating point arithmetic, leading to the maximum geometric accuracy, but also to significantly increased execution times.

執行信息

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

該算子返回一個句柄。 請注意,即使將此句柄用作輸入參數,該句柄類型的實例的狀態也可能被特定的算子所改變。

04. 注意

請注意,使用雙線性或雙三次插值時,不僅矩形的測量,而且矩形周圍的邊緣必須在圖像中。 對于雙線性插值而言,邊緣的寬度(在所有四個方向上)必須至少有一個像素,對于雙三次插值必須至少有兩個像素。 對于不滿足此條件的投影線,不計算灰度值。 因此,在這些位置上不能提取邊緣。

05. 參數

Row (input_control)   rectangle2.center.y → (real / integer)
  矩形中心的Row坐標。
  Default value: 300.0
  Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
  Typical range of values: 0.0 ≤ Row ≤ 511.0 (lin)
  Minimum increment: 1.0
  Recommended increment: 10.0

Column (input_control)    rectangle2.center.x → (real / integer)
  矩形中心的Column坐標。.
  Default value: 200.0
  Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
  Typical range of values: 0.0 ≤ Column ≤ 511.0 (lin)
  Minimum increment: 1.0
  Recommended increment: 10.0

Phi (input_control)    rectangle2.angle.rad → (real / integer)
  矩形的縱軸與水平的角度(弧度)。
  Default value: 0.0
  Suggested values: -1.178097, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.178097
  Typical range of values: -1.178097 ≤ Phi ≤ 1.178097 (lin)
  Minimum increment: 0.001
  Recommended increment: 0.1
  Restriction: (- pi < Phi) && (Phi <= pi)

Length1 (input_control)    rectangle2.hwidth → (real / integer)
  矩形的半寬。
  Default value: 100.0
  Suggested values: 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0, 300.0, 500.0
  Typical range of values: 1.0 ≤ Length1 ≤ 511.0 (lin)
  Minimum increment: 1.0
  Recommended increment: 10.0
  Restriction: Length1 >= 1.0

Length2 (input_control)    rectangle2.hheight → (real / integer)
  矩形的半高。
  Default value: 20.0
  Suggested values: 1.0, 2.0, 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0
  Typical range of values: 0.0 ≤ Length2 ≤ 511.0 (lin)
  Minimum increment: 1.0
  Recommended increment: 10.0

Restriction: Length2 >= 0.0

Width (input_control)    extent.x → (integer)
  隨后要處理的圖像的寬度。
  Default value: 512
  Suggested values: 128, 160, 192, 256, 320, 384, 512, 640, 768
  Typical range of values: 0 ≤ Width ≤ 1024 (lin)
  Minimum increment: 1
  Recommended increment: 16

Height (input_control)    extent.y → (integer)
  隨后要處理的圖像的高度。
  Default value: 512
  Suggested values: 120, 128, 144, 240, 256, 288, 480, 512, 576
  Typical range of values: 0 ≤ Height ≤ 1024 (lin)
  Minimum increment: 1
  Recommended increment: 16

Interpolation (input_control)    string → (string)
  要使用的插值類型。
  Default value: ‘nearest_neighbor’
  List of values: ‘bicubic’, ‘bilinear’, ‘nearest_neighbor’

MeasureHandle (output_control)    measure_id → (integer)
  measure對象句柄

06. 結果

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

HDevelop例程

world_coordinates_line_scan.hdev  使用相機校準,測量線掃描圖像中卡尺的間距線之間的距離
two_camera_calibration.hdev     使用特殊的校準對象執行高精度拼接
pm_measure_board.hdev      定位電路板上的IC并測量引腳距離
measure_tft_cells.hdev       測量TFT LCD顯示器的RGB單元的尺寸
measure_switch.hdev        確定開關的寬度和引腳之間的距離
measure_ring.hdev         用圓形measure對象確定齒輪的寬度
measure_pin.hdev         測量IC的引腳
measure_lcd_cells.hdev       測量分隔LCD顯示器單元的框架的尺寸
measure_ic_leads.hdev       測量IC的引線
measure_caliper.hdev        測量卡尺的間距線之間的距離
measure_arc.hdev         測量金屬部件沿著圓弧的的寬度
gen_measure_rectangle2.hdev   測量垂直于給定線的邊緣
gen_measure_arc.hdev       測量垂直于給定弧的邊
fuzzy_measure_switch.hdev     用一個模糊度量對象確定一個開關引腳的寬度和距離
fuzzy_measure_pin.hdev       使用模糊測量來測量IC的引腳
fuse.hdev            測量保險絲的厚度
correct_measure_direction.hdev   自動更正測量對象的方向
camera_calibration_multi_image.hdev 校準相機并測量卡尺上的位置
camera_calibration_external.hdev   使用相機校準來測量卡尺上的位置
calibration_aimdpm_1_2006.hdev   在檢查2D數據代碼的打印質量之前應用反射率校準
calibrate_cameras_telecentric_tilt.hdev 使用遠心傾斜鏡頭(Scheimpflug)校準
align_measurements_multithreading.hdev 使用多線程并行檢查剃刀刀片
align_measurements.hdev     使用基于形狀的匹配來檢查單個剃刀刀片,以為測量工具調整ROI
3d_coordinates.hdev         測量世界坐標中的傾斜物體

程序示例

07. 附錄

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

總結

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

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