PhD Ma
PhD Ma

Reputation: 107

How to apply a rotation matrix R(3*3) and vector translation T(3*1) to an image in matlab?

I have two images I1 and I2, and I get the rotation matrix R (3*3) and the translation vector T (3*1) between this two images. Now I want to apply this R and T in I1 to get the aligned image J from I1. I try this code but didn't work :

J=(I1.*R)+T; 

some help please

Upvotes: 0

Views: 281

Answers (1)

Miriam Farber
Miriam Farber

Reputation: 19634

You should remove the dot, and do it like that:

J=(R*I1)+T; 

The operation .* is an entry-wise product, while you need the usual matrix multiplication.

Upvotes: 0

Related Questions