How to calculate R,T between C1 and C2? / matlab source / 두 대의 카메라 Rotation, Translation은 어떻게 계산할까?


 Created Date : 2011.8
Language : matlab
Tool : matlab
Library & Utilized : rodrigues function (Jean-Yves Bouguet)
Reference : -
Etc. : -



There are two camera. These camera is arranged as reference of O.
Rotation and Translation of C1 is 

R1 =  -0.009064 0.985541 -0.169195
       0.969714 -0.032636 -0.242051
      -0.244074 -0.166265 -0.955397

T1 = 4.684369
    -7.384014
    29.614508

And Rotation and Translation of C2 is

R2 =  0.078149 0.984739 -0.155505
      0.971378 -0.040117 0.234128
      0.224317 -0.169351 -0.959688

T2 = -10.151448
     -7.261157
      29.69228


So, What is R, T between C1, C2?

wR = R2*inv(R1);
wT = T2-T1;

This matlab code show this process.
We get wR, wT. And C1 is rotated and Translated by wR, wT. Then, the axis of C1 is laid on C2 exactly. 


<source code>

--------------------------------------------------------------------------
두 개의 카메라가 원점을 기준으로 있다.
C1 카메라의 R,T가 있고 C2카메라의 R,T가 원점을 기준으로 있을때, C1과 C2 사이의 R, T는 어떻게 될까? 다음과 같이 간단하게 계산이 가능하다.


wR = R2*inv(R1);
wT = T2-T1;


이 매트랩 소스 코드는 C1, C2 사이의 R,T를 구하고 그 R,T를 이용해서 C1을 C2로 정확히 옮겨짐을 확인하는 소스입니다.

<source code>

Comments

Popular posts from this blog

(OpenCV Study) Background subtractor MOG, MOG2, GMG example source code (BackgroundSubtractorMOG, BackgroundSubtractorMOG2, BackgroundSubtractorGMG)

OpenCV Stitching example (Stitcher class, Panorama)

AMP dose run on my pc?, AMP(Accelerated Massive Parallelism)

Example source code of extract HOG feature from images, save descriptor values to xml file, using opencv (using HOGDescriptor )

Optical Flow sample source code using OpenCV

Real-time N camera stitching Class.

OpenCV meanShiftFiltering example source code ( cpu: pyrMeanShiftFiltering, gpu:meanShiftFiltering, gpu:meanShiftSegmentation )

8 point algorithm (Matlab source code) / The method to get the Fundamental Matrix and the Essential matrix

Image warping (using opencv findHomography, warpPerspective)

Video Stabilization example source code, (using cvFindHomography, cvWarpPerspective functions in openCV)