trans_mat = [[ 9.99999939e-01 -3.49065843e-04 3.60630465e-01]
[ 3.49065843e-04 9.99999939e-01 -2.60340185e-01]]
scale_factor = 1.6
final_trans_mat = ?
final_im = cv2.warpAffine(
mat,
final_trans_mat,
(w, h)
)
How to combine trans_mat
and scale_factor
into one transformation matrix final_trans_mat
?
You have to multiply all elements by the scale factor:
final_trans_mat = trans_mat * scale_factor