【机器视觉】 assign算子
发布日期:2021-06-29 20:52:51
浏览次数:3
分类:技术文章
本文共 1781 字,大约阅读时间需要 5 分钟。
00. 目录
文章目录
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 HDeveloptuple_sets.hdev Apply set operations to tuplestuple_replace.hdev Replace elements of a tupletuple_insert.hdev Insert elements into a tupletuple_compare_elem.hdev Compare tuples elementwisetuple.hdev Work with tuplesstring.hdev Format strings and numberssine.hdev Compute and draw the sine from 0 to 3*PImeasure_metal_part_extended.hdev Measure several features of a metal partmeasure_grid.hdev Get junctions of a grid that separates keyslines_gauss.hdev Extract lines and their widthslines_color.hdev Extract lines using color informationget_circle_pose.hdev Determine the pose of circles in 3D from their perspective 2D projectionseuclid_distance.hdev Calculate euclidian distances for a tuple of coordinatescompare.hdev Perform comparisons on scalars, tuples and stringsbit.hdev Perform bitwise operations on scalarsassign.hdev Assign values to variables and tuple elementsarithmetic.hdev Perform operations on scalars, tuples and stringsangio.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/117932629 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
初次前来,多多关照!
[***.217.46.12]2024年04月04日 11时34分05秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
微信小程序canvas绘制圆角矩形
2021-07-03
微信小程序canvas裁剪图片中间部分
2021-07-03
my docker tutorial
2021-07-03
gdb debug summary
2021-07-03
python learning
2021-07-03
collections
2021-07-03
第二个MacBook,继续加油!
2021-07-03
unittest source code learning
2021-07-03
故障处理_vxwork 大端序和变量指针
2021-07-03
写在前面的话
2021-07-03
数据结构学习_树(1)
2021-07-03
数据结构学习_树(2)
2021-07-03
数据结构学习_树(3)
2021-07-03
数据结构学习_树(4)
2021-07-03
数组与矩阵(1)_矩阵相乘
2021-07-03
数据结构学习_图(1)深度优先搜索、广度优先搜索和最小生成树
2021-07-03
数据结构学习_图(1)拓扑排序
2021-07-03
第17章 custom views
2021-07-03
“老外学中文“-开发进度
2021-07-03