当前位置:网站首页>Halcon knowledge: matrix topic [02]
Halcon knowledge: matrix topic [02]
2022-06-30 16:39:00 【Mr anhydrous】
One 、 summary
Above 《 halcon knowledge : Matrix topics 【01】》 in , Record 10 strip halcon Basic matrix operators . In this article, we will continue with the operators of matrices , Including arithmetic operations 、 preservation 、 Read in, etc 10 Bar operator operation .
Two 、 Matrix operator
2.1 Matrix transposition
transpose_matrix(matrix_3_id,matrix_trans_id)
get_full_matrix(matrix_trans_id,values_trans)
2.2 Matrix sum
Matrix summation operation
- Sum by column
sum_matrix(matrix_3_id,‘columns’,matrix_sum_cols_id)
get_full_matrix(matrix_sum_cols_id,values_sum_cols)
- Sum up by line
sum_matrix(matrix_3_id,‘rows’,matrix_sum_rows_id)
get_full_matrix(matrix_sum_rows_id,values_sum_rows)
- Sum the whole matrix
sum_matrix(matrix_3_id,‘full’,matrix_sum_full_id)
get_full_matrix(matrix_sum_full_id,values_sum_full)
2.3 Addition and subtraction
- Matrix addition
add_matrix(matrix_3_id,matrix_4_id,matrix_add_id)
get_full_matrix(matrix_add_id,values_add)
- Matrix subtraction
sub_matrix(matrix_3_id,matrix_4_id,matrix_sub_id)
get_full_matrix(matrix_sub_id,values_sub)
2.4 Matrix multiplication and division
- matrix multiplication
mult_matrix(matrix_a_id,matrix_b_id,‘AB’,matrix_mult_id)
get_full_matrix(matrix_mult_id,values_mult)
- A matrix is multiplied by a constant
scale_matrix(matrix_3_id,1.5,matrix_scale_id)
get_full_matrix(matrix_scale_id,values_scale)
- Matrix Division
div_element_matrix(matrix_3_id,matrix_4_id,matrix_div_id)
get_full_matrix(matrix_div_id,values_matrix_div)
- matrix element-wise Multiply
mult_element_matrix(matrix_3_id,matrix_4_id,mult_elems_id)
get_full_matrix(mult_elems_id,values_mult_elems)
2.5 Norm of matrix
We know , As a vector, I have 1 norm ,2 norm ,N Norm and infinite norm , Matrices have the same properties .
- norm_matrix( : : MatrixID, NormType : Value)
such as :norm_matrix( matrix_id, ‘2-norm’, value_norm ) Get the second norm of the matrix .
norm :
'1-norm':1 norm , Is the sum of the absolute values of all the elements in the matrix .
‘2-norm’:2 norm , Calculation 2 norm . The result is the maximum singular value of the matrix . The calculation formula of the result is :
'frobenius-norm': It's the Euclidean norm , That is, the sum of the squares of all the elements in the matrix 、 For this and the prescription .
'infinity-norm': The infinite norm , That is, all the elements in the matrix take absolute values respectively , The biggest .
2.6 Statistics of elements
Get the matrix mean
- Average by column
mean_matrix(matrix_3_id,‘columns’,matrix_mean_cols_id)
get_full_matrix(matrix_mean_cols_id,values_mean_cols)
- Average by row
mean_matrix(matrix_3_id,‘rows’,matrix_mean_rows_id)
get_full_matrix(matrix_mean_rows_id,values_mean_rows)
- The mean value of the whole matrix
mean_matrix(matrix_3_id,‘full’,matrix_mean_full_id)
get_full_matrix(matrix_mean_full_id,values_mean_full)
2.7 Max min
- Get the minimum value of the matrix
Get... By column
min_matrix(matrix_3_id,‘columns’,matrix_min_cols_id)
get_full_matrix(matrix_min_cols_id,values_min_cols)
Press the line to get
min_matrix(matrix_3_id,‘rows’,matrix_min_rows_id)
get_full_matrix(matrix_min_rows_id,values_min_rows)
The maximum value of the whole matrix
min_matrix(matrix_3_id,‘full’,matrix_min_full_id)
get_full_matrix(matrix_min_full_id,values_min_full)
- Get the maximum value of the matrix
Get... By column
max_matrix(matrix_3_id,‘columns’,matrix_max_cols_id)
get_full_matrix(matrix_max_cols_id,values_max_cols)
Press the line to get
max_matrix(matrix_3_id,‘rows’,matrix_max_rows_id)
get_full_matrix(matrix_max_rows_id,values_max_rows)
The maximum value of the whole matrix
max_matrix(matrix_3_id,‘full’,matrix_max_full_id)
get_full_matrix(matrix_max_full_id,values_max_full)
Matrix linear solution
solve_matrix(matrix_3_id,‘general’,0,matrix_c_id,matrix_solve_result_id)
get_full_matrix(matrix_solve_result_id,values_matrix_solve)
2.8 Index of operation
matrix element-wise Index of operation
pow_element_matrix(matrix_3_id,matrix_4_id,matrix_pow_elem_id)
get_full_matrix(matrix_pow_elem_id,values_pow_elem)
Matrix exponential operation
pow_scalar_element_matrix(matrix_3_id,3,matrix_pow_scale_id)
get_full_matrix(matrix_pow_scale_id,values_pow_scale)
2.9 Matrix square operation
sqrt_matrix(matrix_3_id,matrix_sqrt_id)
get_full_matrix(matrix_sqrt_id,values_sqrt)
2.10 matrix SVD solve
svd_matrix(matrix_3_id,‘full’,‘right’,matrix_u_id,matrix_s_id,matrix_v_id)
get_full_matrix(matrix_u_id,values_u)
get_full_matrix(matrix_s_id,values_s)
get_full_matrix(matrix_v_id,values_v)
2.11 Matrix access
Matrix save
write_matrix(matrix_3_id,‘binary’,’…/…/temp/matrix_3_id.dat’)
Read matrix
read_matrix(’…/…/temp/matrix_3_id.dat’,matrix_3_3_id)
get_full_matrix(matrix_3_3_id,values_read)
( Ongoing update )
边栏推荐
- CloudXR如何推动XR的未来发展
- Hologres共享集群助力淘宝订阅极致精细化运营
- MC Instruction Decoder
- flink sql cdc 同步sqlserver 报错什么原因啊
- 【Unity UGUI】ScrollRect 动态缩放格子大小,自动定位到中间的格子
- How to connect the Internet Reading Notes - Summary
- 抖快B为啥做不好综艺
- RT thread heap size Setting
- Cesium-1.72 learning (deploy offline resources)
- Explain in detail the use of for loop, break and continue in go language
猜你喜欢

Distributed machine learning: model average Ma and elastic average easgd (pyspark)
![[download attached] installation and use of penetration test artifact Nessus](/img/ef/b6a37497010a8320cf5a49a01c2dff.png)
[download attached] installation and use of penetration test artifact Nessus

The new tea drinks are "dead and alive", but the suppliers are "full of pots and bowls"?

BC1.2 PD协议

抖快B为啥做不好综艺
![[machine learning] K-means clustering analysis](/img/5f/3199fbd4ff2129d3e4ea518812c9e9.png)
[machine learning] K-means clustering analysis

'<', hexadecimal value 0x3C, is an invalid 问题解决

【活动报名】探秘元宇宙,就差你了!7月2号我在深圳现场等你!

中航无人机科创板上市:市值385亿 拳头产品是翼龙无人机

24:第三章:开发通行证服务:7:自定义异常(来表征程序中出现的错误);创建GraceExceptionHandler来全局统一处理异常(根据异常信息,构建对应的API统一返回对象的,JSON数据);
随机推荐
RT-Thread 堆区大小设置
备战数学建模36-时间序列模型2
CloudXR如何推动XR的未来发展
优惠券种类那么多,先区分清楚再薅羊毛!
[machine learning] K-means clustering analysis
topic: Privacy, Deception and Device Abuse
Interesting research on mouse pointer interaction
microblaze 串口学习·2
附加:(还没写,别看~~~)WebMvcConfigurer接口;
Google play index table
【Verilog基础】十进制负数的八进制、十六进制表示
MySQL master-slave configuration
2020蓝桥杯国赛B组-搬砖-(贪心排序+01背包)
Types of waveguides
Siyuan notes: can you provide shortcut keys for folding all titles on the page?
电子烟强制性国家标准GB 41700-2022发布 2022年10月1日起实施
What are the reasons for the errors reported by the Flink SQL CDC synchronization sqlserver
What role does "low code" play in enterprise digital transformation?
Installing jupyter notebook under Anaconda
几百行代码实现一个 JSON 解析器