当前位置:网站首页>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 )
边栏推荐
- Li Zexiang, a legendary Chinese professor, is making unicorns in batches
- 备战数学建模33-灰色预测模型2
- 【机器学习】K-means聚类分析
- 附加:(还没写,别看~~~)CorsFilter过滤器;
- Explain in detail the use of for loop, break and continue in go language
- 牛客网:有多少个不同的二叉搜索树
- 2022新消费半年盘点:行业遇冷,但这九个赛道依然吸金
- 2020蓝桥杯国赛B组-搬砖-(贪心排序+01背包)
- Table responsive layout tips for super nice
- 赛芯电子冲刺科创板:拟募资6.2亿 实控人谭健为美国籍
猜你喜欢

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

Li Zexiang, a legendary Chinese professor, is making unicorns in batches

大学生研究生毕业找工作,该选择哪个方向?
mysql8报错:ERROR 1410 (42000): You are not allowed to create a user with GRANT解决办法

Policy Center > Google Play‘s Target API Level Policy

优惠券种类那么多,先区分清楚再薅羊毛!

Policy Center > Device and Network Abuse

KDD 2022 | 我们离通用预训练推荐模型还有多远?推荐系统的通用序列表示学习模型 UniSRec

云化XR,如何助力产业升级

牛客网:乘积为正数的最长连续子数组
随机推荐
15年做糊21款硬件,谷歌到底栽在哪儿?
今晚19:00知识赋能第2期直播丨OpenHarmony智能家居项目之控制面板界面设计
360 digital, ant group, etc. were selected as member units of the "business security promotion plan" of the Chinese Academy of Communications
Yunhe enmo won the bid for Oracle maintenance project of Tianjin Binhai rural commercial bank in 2022-2023
Hundreds of lines of code to implement a JSON parser
云化XR,如何助力产业升级
招标公告:深圳市财政局数据库异地灾备项目
Explain in detail the use of for loop, break and continue in go language
mysql8报错:ERROR 1410 (42000): You are not allowed to create a user with GRANT解决办法
中国传奇教授李泽湘,正在批量制造独角兽
The inspiration from infant cognitive learning may be the key to the next generation of unsupervised machine learning
新茶饮“死去活来”,供应商却“盆满钵满”?
牛客网:乘积为正数的最长连续子数组
halcon知识:矩阵专题【02】
[download attached] installation and use of penetration test artifact Nessus
19:00 p.m. tonight, knowledge empowerment phase 2 live broadcast - control panel interface design of openharmony smart home project
2020蓝桥杯国赛B组-搬砖-(贪心排序+01背包)
Table responsive layout tips for super nice
互联网研发效能之去哪儿网(Qunar)核心领域DevOps落地实践
[bjdctf2020]the mystery of ip|[ciscn2019 southeast China division]web11|ssti injection