当前位置:网站首页>Halcon principle: one dimensional function_ 1D type [1]
Halcon principle: one dimensional function_ 1D type [1]
2022-06-23 11:59:00 【Mr anhydrous】
We know , Tuples are one-dimensional , But it's not a function . One dimensional functions are special data generated by tuples , For functions , There is a special set of operators to operate .
One 、 How to generate
1.1 Generate by tuple function_1d function
- create_funct_1d_array: Create a discrete one-dimensional function from a one-dimensional array

- create_funct_1d_pairs: Create a discrete one-dimensional function through a double one-dimensional array

Be careful : Argument tuple XValue Must be sorted ( From small to large ).
1.2 1d Inverse operation on function
1)funct_1d_to_pairs Get one-dimensional discrete function x and y Value corresponding tuple
funct_1d_to_pairs( flow, XValues1, YValues1)
From the input function flow Get two tuples :XValues1, YValues1

2)get_y_value_funct_1d Get one-dimensional discrete function y value ( No more details )
Two 、1d One dimensional operations on functions
1)abs_funct_1d Calculate the absolute value of a one-dimensional function
Prototype :abs_funct_1d( : : Function : FunctionAbsolute)

2)compose_funct_1 Compound two discrete one-dimensional functions into one function
This is a composite function , such as : 
3、 ... and 、 Comprehensive sample code
Understand the above operations , You can understand the following code :
* This example program shows how to use compose_funct_1d. It computes
* two functions, atan(x) and cos(x), and composes them, which results in the
* function cos(atan(x)). This function is, of course, identical to 1/sqrt(1+x*x),
* so this function is also calculated. The program displays all four functions.
* By comparing the last two plots, we can check whether compose_funct_1d
* works correctly.
dev_update_off ()
dev_close_window ()
dev_open_window (0, 0, 512, 512, 'white', WindowHandle)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
dev_set_color ('black')
dev_set_line_width (2)
X := []
for J := -125 to 125 by 1
X := [X,J / 40.0]
endfor
stop()
create_funct_1d_pairs (X, cos(X), Cos)
X := []
for J := -100 to 100 by 1
X := [X,J / 10.0]
endfor
stop()
create_funct_1d_pairs (X, atan(X), ATan)
create_funct_1d_pairs (X, 1 / sqrt(1 + X * X), InvSqrt1pSqX)
compose_funct_1d (ATan, Cos, 'constant', CosATan)
plot_funct_1d (WindowHandle, ATan, 'x', 'atan(x)', 'red', ['axes_color','origin_x','origin_y'], ['black',0,0])
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
dev_clear_window ()
plot_funct_1d (WindowHandle, Cos, 'x', 'cos(x)', 'red', ['axes_color','origin_x','origin_y'], ['black',0,0])
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
dev_clear_window ()
plot_funct_1d (WindowHandle, CosATan, 'x', 'cos(atan(x))', 'red', ['axes_color','origin_x','origin_y','start_y'], ['black',0,0,0])
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
dev_clear_window ()
plot_funct_1d (WindowHandle, InvSqrt1pSqX, 'x', '1/sqrt(1+x*x)', 'red', ['axes_color','origin_x','origin_y','start_y'], ['black',0,0,0])
* ( To be continued )
边栏推荐
- RF Analyzer Demo搭建
- Design of routing service for multi Activity Architecture Design
- 学习笔记 scrapy 爬虫框架
- Common fault analysis and Countermeasures of MySQL in go language
- Use monotone stack to solve problems
- MySQL在一个字段中匹配多个值
- CIFAR公开第二阶段泛加拿大AI战略
- Signature analysis of app x-zse-96 in a Q & a community
- navicat定时任务无效
- Meta称英安全法可能“扫描所有私人信息” 或侵犯隐私
猜你喜欢

Easy to understand soft route brushing tutorial

汉源高科8路电话+1路百兆以太网RJ11电话光端机 8路PCM电话光端机

杜邦分析法解读:安阳钢铁股份有限公司企业投资价值何在?

Open classes are short videos! Tonight, I will teach you how to realize accurately!

4E1 PDH光端机19英寸机架式单纤传输20km E1接口光纤网络光端机

汉源高科USB3.0光端机USB工业触摸屏光端机USB3.0光纤延长器USB3.0光纤传输器

Runtime application self-protection (rasp): self-cultivation of application security

Meta称英安全法可能“扫描所有私人信息” 或侵犯隐私

并购增资或将有望启动东软越通新动能?

Getting started with redis - Chapter 2 - data structures and objects - linked lists
随机推荐
Slam Laser 2D (en utilisant Laser Scan matcher)
Is there any regulation on the redemption time of financial products?
Introduction to redis - Chapter 1 - data structures and objects - simple dynamic string (SDS)
PPT制作3D旋转动画从入门到进阶
RF Analyzer Demo搭建
LinkedList 5-141. Circular linked list
[cloud based co creation] overview of the IOT of Huawei cloud HCIA IOT v2.5 training series
Halcon知识:binocular_disparity 知识
DuPont analysis: what is the investment value of Anyang Iron and Steel Co., Ltd?
halcon原理:相关性匹配
Leetcode 1209. 删除字符串中的所有相邻重复项 II(牛逼,终于过了)
运行时应用自我保护(RASP):应用安全的自我修养
HMS core video editing service has the ability to open templates, helping users get the same cool video with one click
链表5 - 234. 回文链表
4E1 PDH光端机19英寸机架式单纤传输20km E1接口光纤网络光端机
蓝桥杯单片机(一)——关闭外设及熄灭LED
二维激光SLAM( 使用Laser Scan Matcher )
二維激光SLAM( 使用Laser Scan Matcher )
Voice data annotation tools and platforms
ESP32-C3入门教程 问题篇⑦—— fatal error: esp_bt.h: No such file or directory 找不到esp_bt.h