add scale information into a transformation matrix

542 views Asked by At
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 ?

1

There are 1 answers

0
kallaballa On

You have to multiply all elements by the scale factor:

final_trans_mat = trans_mat * scale_factor