#%%
import numpy as np
T_total1 = np.array([[ 0.00680154, 0.0406899, -0.99914863, 0.367304], # 场景2的10.png 橙色物体校准 矩阵乘,公式校准后
[-0.99264958, -0.12046085, -0.01166302, 0.45615918],
[-0.12083286, 0.9918838, 0.03957153, 0.2620962],
[ 0. , 0. , 0. , 1. ]])
T_total2 = np.array([[ 0.00680154, 0.0406899, -0.99914863, 0.367304], # 场景2的10.png 橙色物体校准 矩阵乘,公式校准后
[-0.99264958, -0.12046085, -0.01166302, 0.45615918],
[-0.12083286, 0.9918838, 0.03957153, 0.2620962],
[ 0. , 0. , 0. , 1. ]])
res_array_x = T_total1*T_total2
res_array_dot = np.dot(T_total1, T_total2)
res_array_mut = np.multiply(T_total1, T_total2)
print('res_array_x:', res_array_x) #点乘
print('res_array_dot:',res_array_dot)#矩阵乘
print('res_array_mut:',res_array_mut)#点乘
T_total1_mat = np.mat(T_total1)
T_total2_mat = np.mat(T_total2)
mat_res_array_x = T_total1_mat*T_total2_mat
mat_res_array_dot = np.dot(T_total1_mat, T_total2_mat)
mat_res_array_mut = np.multiply(T_total1_mat, T_total2_mat)
print('mat_res_array_x:', mat_res_array_x)#矩阵乘
print('mat_res_array_dot:',mat_res_array_dot)#矩阵乘
print('mat_res_array_mut:',mat_res_array_mut)#点乘
#%% 运行结果
res_array_x: [[4.62609464e-05 1.65566796e-03 9.98297985e-01 1.34912228e-01]
[9.85353189e-01 1.45108164e-02 1.36026036e-04 2.08081197e-01]
[1.46005801e-02 9.83833473e-01 1.56590599e-03 6.86944181e-02]
[0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]]
res_array_dot: [[ 0.08038544 -0.99566413 -0.04680816 0.12649025]
[ 0.11423314 -0.03744836 0.99274788 0.03354886]
[-0.99019643 -0.08514948 0.11072753 0.68054226]
[ 0. 0. 0. 1. ]]
res_array_mut: [[4.62609464e-05 1.65566796e-03 9.98297985e-01 1.34912228e-01]
[9.85353189e-01 1.45108164e-02 1.36026036e-04 2.08081197e-01]
[1.46005801e-02 9.83833473e-01 1.56590599e-03 6.86944181e-02]
[0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]]
mat_res_array_x: [[ 0.08038544 -0.99566413 -0.04680816 0.12649025]
[ 0.11423314 -0.03744836 0.99274788 0.03354886]
[-0.99019643 -0.08514948 0.11072753 0.68054226]
[ 0. 0. 0. 1. ]]
mat_res_array_dot: [[ 0.08038544 -0.99566413 -0.04680816 0.12649025]
[ 0.11423314 -0.03744836 0.99274788 0.03354886]
[-0.99019643 -0.08514948 0.11072753 0.68054226]
[ 0. 0. 0. 1. ]]
mat_res_array_mut: [[4.62609464e-05 1.65566796e-03 9.98297985e-01 1.34912228e-01]
[9.85353189e-01 1.45108164e-02 1.36026036e-04 2.08081197e-01]
[1.46005801e-02 9.83833473e-01 1.56590599e-03 6.86944181e-02]
[0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]]