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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人工智能 > ChatGpt >内容正文

ChatGpt

Halcon Example - 圆弧测量对象的使用

發布時間:2024/7/5 ChatGpt 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Halcon Example - 圆弧测量对象的使用 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在 measure_arc.hdev 示例的基礎上,修改優化,并添加注釋

read_image (Zeiss1, 'zeiss1') get_image_size (Zeiss1, Width, Height) dev_close_window () dev_open_window (0, 0, Width / 2, Height / 2, 'black', WindowHandle) set_display_font (WindowHandle, 14, 'mono', 'true', 'false') dev_display (Zeiss1) * disp_continue_message (WindowHandle, 'black', 'true') * stop ()* 弧線圓心 Row := 275 Column := 335 * disp_cross (WindowHandle, Row, Column, 6, 0) * 弧線半徑 Radius := 107 * disp_circle (WindowHandle, Row, Column, Radius) * 弧線起點和終點 AngleStart := -rad(55) AngleExtent := rad(170)dev_set_draw ('fill') dev_set_color ('green') dev_set_line_width (1) * draw_ellipse (WindowHandle, Row, Column, Phi, Radius1, Radius2) get_points_ellipse (AngleStart + AngleExtent, Row, Column, 0, Radius, Radius, RowPoint, ColPoint) disp_arc (WindowHandle, Row, Column, AngleExtent, RowPoint, ColPoint) dev_set_line_width (3)* 準備用于提取垂直于環形弧的直邊的測量對象 * CenterRow (input_control) Row coordinate of the center of the arc. * CenterCol (input_control) Column coordinate of the center of the arc. * Radius (input_control) Radius of the arc. * AngleStart (input_control) Start angle of the arc in radians. * AngleExtent (input_control) Angular extent of the arc in radians. * AnnulusRadius (input_control) Radius (half width) of the annulus. * Width (input_control) Width of the image to be processed subsequently. * Height (input_control) Height of the image to be processed subsequently. * Interpolation (input_control) Type of interpolation to be used. * MeasureHandle (output_control) Measure object handle. gen_measure_arc (Row, Column, Radius, AngleStart, AngleExtent, 10, Width, Height, 'nearest_neighbor', MeasureHandle) count_seconds (Seconds1) * 提取垂直于矩形或環形弧的直邊 * Image (input_object) 輸入圖像 * MeasureHandle (input_control) 測量對象句柄 * Sigma (input_control) 高斯平滑系數 * Threshold (input_control) 最小邊緣幅度 * Transition (input_control) Light/dark 或者 dark/light 邊緣 * Select (input_control) 選擇終點 * RowEdge (output_control) Row coordinate of the center of the edge * ColumnEdge (output_control) Column coordinate of the center of the edge * Amplitude (output_control) 邊緣的邊緣幅度(帶符號) * Distance (output_control) 連續邊緣之間的距離 measure_pos (Zeiss1, MeasureHandle, 1, 10, 'all', 'all', RowEdge, ColumnEdge, Amplitude, Distance) count_seconds (Seconds2) Time := Seconds2 - Seconds1* 計算第二點到第三點之間的距離 distance_pp (RowEdge[1], ColumnEdge[1], RowEdge[2], ColumnEdge[2], IntermedDist) dev_set_color ('blue') disp_cross (WindowHandle, RowEdge, ColumnEdge, 6, 0) dev_set_color ('red') disp_line (WindowHandle, RowEdge[1], ColumnEdge[1], RowEdge[2], ColumnEdge[2]) dev_set_color ('yellow') disp_message (WindowHandle, 'Distance: ' + IntermedDist, 'image', -1, -1, 'yellow', 'false') * 釋放測量對象 close_measure (MeasureHandle)

轉載于:https://www.cnblogs.com/zdfffg/p/11413941.html

總結

以上是生活随笔為你收集整理的Halcon Example - 圆弧测量对象的使用的全部內容,希望文章能夠幫你解決所遇到的問題。

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