Reputation: 41
I have a set of multiple cameras for which I did a calibration procedure using this code: http://cmp.felk.cvut.cz/~svoboda/SelfCal/ and I found for each camera the intrinsic parameteres in 3x3 K matrix, rotation matrix R and translation vector t. I now want to rectify the images from all the cameras. Can anyone explain to me how to do that in matlab? Thanks
Upvotes: 2
Views: 1517
Reputation: 650
Actually rectification itself is a very simple process. You can use these formulas which involves very simple matrix multiplication.
P1 = K1*[R1|T1] ; P2 = K2*[R2|T2] ;
C1 = K1 *R1(inverse)* K1*T1 ; C2 =K2 * R2(inverse) * K2 * T2
V1 = C1 –C2 ; V2 =( last row of R1 )T X v1 (cross product); V3 = V1 X V2 (cross product)
R = [V1(transpose) /norm(V1)
V2(transpose) /norm(V2)
V3(transpose)/norm(V3) ]
These equations are from the following paper: http://david.fofi.free.fr/IMG/pdf/Fusiello_2000.pdf
They also have a MATLAB code available which you can use directly. Please check the paper.
I hope this helps.
Upvotes: 1