0

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

PhD Ma
  • 107
  • 7

1 Answers1

0

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.

Miriam Farber
  • 18,986
  • 14
  • 61
  • 76
  • I always have the same error message even with `(R * I1) + T`, `I1` is of size `N * M * 3` is this the problem ?? – PhD Ma Mar 24 '17 at 12:56
  • 1
    In such case, the dimensions just do not match. You cannot apply a 3-by-3 rotation matrix on an N-by-M-by-3 image. – Miriam Farber Mar 24 '17 at 12:59