当前位置:网站首页>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 )
边栏推荐
- 2022蓝桥杯国赛B组-2022-(01背包求方案数)
- 2020蓝桥杯国赛B组-搬砖-(贪心排序+01背包)
- microblaze 串口学习·2
- RT thread heap size Setting
- 猎头5万挖我去VC
- 构建适合组织的云原生可观测性能力
- 为了使远程工作不受影响,我写了一个内部的聊天室 | 社区征文
- mysql8报错:ERROR 1410 (42000): You are not allowed to create a user with GRANT解决办法
- Additional: (not written yet, don't look at ~ ~ ~) corsfilter filter;
- What is XR extended reality and what are the XR cloud streaming platforms
猜你喜欢

Arcmap操作系列:80平面转经纬度84

MySQL transaction / lock / log summary

抖快B为啥做不好综艺
Mysql8 error: error 1410 (42000): you are not allowed to create a user with grant solution
Two methods for MySQL to open remote connection permission

更多龙蜥自研特性!生产可用的 Anolis OS 8.6 正式发布

RT-Thread 堆區大小設置

RT thread heap size Setting
Mysql8.0 method and steps for enabling remote connection permission

云技能提升好伙伴,亚马逊云师兄今天正式营业
随机推荐
备战数学建模34-BP神经网络预测2
云技能提升好伙伴,亚马逊云师兄今天正式营业
The inspiration from infant cognitive learning may be the key to the next generation of unsupervised machine learning
go-zero微服务实战系列(八、如何处理每秒上万次的下单请求)
IIS无法加载字体文件(*.woff,*.svg)的解决办法
Arcmap操作系列:80平面转经纬度84
Implementation of Devops in the core field of qunar, the Internet R & D Efficiency
云化XR,如何助力产业升级
Carry two load balancing notes and find them in the future
更多龙蜥自研特性!生产可用的 Anolis OS 8.6 正式发布
RTP 发送PS流零拷贝方案
中航无人机科创板上市:市值385亿 拳头产品是翼龙无人机
15年做糊21款硬件,谷歌到底栽在哪儿?
After 15 years of working on 21 types of hardware, where is Google?
Interesting research on mouse pointer interaction
Policy Center-Permissions and APIs that Access Sensitive Information
microblaze 串口学习·2
【活动报名】探秘元宇宙,就差你了!7月2号我在深圳现场等你!
【牛客网刷题系列 之 Verilog快速入门】~ 位拆分与运算
微信表情符号写入判决书,你发的OK、炸弹都可能成为“呈堂证供”