【机器视觉】 assign算子
00. 目錄
文章目錄
- 00. 目錄
- 01. 概述
- 02. 簽名
- 03. 描述
- 04. 注意
- 05. 參數
- 06. 結果
- 07. 附錄
01. 概述
assign-為控制變量分配一個新的值
02. 簽名
assign( : : Input : Result)
03. 描述
為控制變量分配一個新的值。
在全文編輯器中,只需用:=就可以進行賦值,例如:
u := sin(x) + cos(y)
這相當于c語言的賦值語法
u = sin(x) + cos(y);
如果使用算子窗口來賦值,算子combobox中必須寫assign把它作為一個算子,它會打開參數區域。參數Input代表了要輸入的變量,即為等號的右側的值。參數Result為等號左側的變量。
04. 注意
除了參數描述中所指示的控制參數類型之外,assign還支持圖像變量和容器變量。 對于賦值,兩個參數 Input 和 Result 的參數類型必須相同。 對于圖像對象的賦值,內部使用了算子 copy_obj。
05. 參數
Input(input_control) real(-array) → (real / integer / string)
新值
默認參數:1
Result (output_control) real(-array) → (real / integer / string)
需要賦值的變量
06. 結果
如果表達式正確,assign返回2(H_MSG_TRUE)。否則否則會引發異常并返回錯誤代碼。
HDevelop例程
variable_types.hdev Define variable types in HDevelop tuple_sets.hdev Apply set operations to tuples tuple_replace.hdev Replace elements of a tuple tuple_insert.hdev Insert elements into a tuple tuple_compare_elem.hdev Compare tuples elementwise tuple.hdev Work with tuples string.hdev Format strings and numbers sine.hdev Compute and draw the sine from 0 to 3*PI measure_metal_part_extended.hdev Measure several features of a metal part measure_grid.hdev Get junctions of a grid that separates keys lines_gauss.hdev Extract lines and their widths lines_color.hdev Extract lines using color information get_circle_pose.hdev Determine the pose of circles in 3D from their perspective 2D projections euclid_distance.hdev Calculate euclidian distances for a tuple of coordinates compare.hdev Perform comparisons on scalars, tuples and strings bit.hdev Perform bitwise operations on scalars assign.hdev Assign values to variables and tuple elements arithmetic.hdev Perform operations on scalars, tuples and strings angio.hdev Extract blood vessels and their diameters from an angiogram程序示例
Tuple1 := [1,0,3,4,5,6,7,8,9] Val := sin(1.2) + cos(1.2) Tuple2 := []07. 附錄
7.1 機器視覺博客匯總
網址:https://dengjin.blog.csdn.net/article/details/116837497
總結
以上是生活随笔為你收集整理的【机器视觉】 assign算子的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【机器视觉】 dev_update_ti
- 下一篇: 【机器视觉】 assign_at算子