【机器视觉】 assign算子
00. 目錄
文章目錄
- 00. 目錄
- 01. 概述
- 02. 簽名
- 03. 描述
- 04. 注意
- 05. 參數(shù)
- 06. 結(jié)果
- 07. 附錄
01. 概述
assign-為控制變量分配一個(gè)新的值
02. 簽名
assign( : : Input : Result)
03. 描述
為控制變量分配一個(gè)新的值。
在全文編輯器中,只需用:=就可以進(jìn)行賦值,例如:
u := sin(x) + cos(y)
這相當(dāng)于c語(yǔ)言的賦值語(yǔ)法
u = sin(x) + cos(y);
如果使用算子窗口來(lái)賦值,算子combobox中必須寫(xiě)assign把它作為一個(gè)算子,它會(huì)打開(kāi)參數(shù)區(qū)域。參數(shù)Input代表了要輸入的變量,即為等號(hào)的右側(cè)的值。參數(shù)Result為等號(hào)左側(cè)的變量。
04. 注意
除了參數(shù)描述中所指示的控制參數(shù)類(lèi)型之外,assign還支持圖像變量和容器變量。 對(duì)于賦值,兩個(gè)參數(shù) Input 和 Result 的參數(shù)類(lèi)型必須相同。 對(duì)于圖像對(duì)象的賦值,內(nèi)部使用了算子 copy_obj。
05. 參數(shù)
Input(input_control) real(-array) → (real / integer / string)
新值
默認(rèn)參數(shù):1
Result (output_control) real(-array) → (real / integer / string)
需要賦值的變量
06. 結(jié)果
如果表達(dá)式正確,assign返回2(H_MSG_TRUE)。否則否則會(huì)引發(fā)異常并返回錯(cuò)誤代碼。
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 機(jī)器視覺(jué)博客匯總
網(wǎng)址:https://dengjin.blog.csdn.net/article/details/116837497
總結(jié)
以上是生活随笔為你收集整理的【机器视觉】 assign算子的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 【机器视觉】 dev_update_ti
- 下一篇: 【机器视觉】 assign_at算子