Advertisement
dan-masek

Untitled

Jun 2nd, 2021
1,958
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. import numpy as np
  2.  
  3. N_ROW = 1080
  4. N_COL = 1920
  5. N_light = 20
  6.  
  7. img_kido_dx = np.empty((N_ROW * N_COL, N_light))
  8. img_kido_dy = np.empty((N_ROW * N_COL,N_light))
  9. Rpg_grad_p = np.empty((N_ROW  * N_COL,N_light))
  10. Rpg_grad_q = np.empty((N_ROW * N_COL,N_light))
  11.  
  12. mat_E = np.hstack([img_kido_dx, img_kido_dy]).reshape(-1,2,20)
  13. mat_R = np.hstack([Rpg_grad_p, Rpg_grad_q]).reshape(-1,2,20)
  14.  
  15. mat_M = np.linalg.pinv(mat_R)
  16. mat_H = np.matmul(mat_E, mat_M)
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement