zoukankan      html  css  js  c++  java
  • Towards the Theory of Stereo Rectification

    #Stereo Rectification ##[This is an original blog, not citation] [Visit My GitHub](http://www.github.com/hiroki-kyoto/) For stereo matching, rectification is required, however, it will be confucious to complete this task using opencv. Calibration and rectification are implemented in opencv by a wierd manner: the projection matrix of $3 imes4$ elements are not used fully, only $3 imes3$ of the top-left submatrix is used to rectify the views. While, we can give it an explanation but the author does not give even a hint in the code, not to mention an explanation in the documents. Actually, only rotation matrix can be used in rectification, despite the fact that the translation vector exists between two views. A translation vector contains offset in axis $Z$, which is strongly related to the exact depth of point in real world. This is going beyond our control with only pixels on hand. We do not know the depth for each pixel with certainty, therefore, the projection matrix should not include any non-zero element on $Z$ axis. Opencv adopted an approach to avoiding using Translation vector in its absolute scale, converting a single translation transform into two rotation matrices, one for each view. This is how it is done:
    • Retrieve (R) and (vec{t}), satisfying (P_2equiv Rcdot P_1+vec{t});
    • Set the first rotation matrix for both view (R_1=R^{-frac{1}{2}}), (R_2=R^{frac{1}{2}}) to put two cameras parallel but not in the same plane;
    • Set the second rotation matrix for both view (R_3=R_ycdot R_z) to put tow cameras co-plannar, in which, (R_y) and (R_z) are respectively the corresponding rotation matrix along axis (Y) and (Z) to rotate the transformed vector of (vec{t'}=R_1cdotvec{t}) to new axis (X) of left camera, the angles are easy to solve as: (cos heta_y = vec{t'}cdotvec{e_y}) and (cos heta_z = vec{t'}cdotvec{e_z});
    • Apply (R_1cdot R_3) to left camera, apply (R_2cdot R_3) to the right.
    ##3-Dimension Rotation represented in exponential manner $$ R_i=e^{[ heta_i]_×},[ heta_i]_×=egin{bmatrix} 0&- heta_{i3}& heta_{i2}\ heta_{i3}&0&- heta_{i1}\- heta_{i2}& heta_{i1}&0\end{bmatrix} ag 1 $$
  • 相关阅读:
    Eclipse 导入外部项目无法识别为web项目并且无法在部署到tomcat下
    Android开发-API指南-<activity-alias>[原创译文]
    深入WeakHashMap
    寻找第K大数的方法总结
    overridePendingTransition的简介
    Oracle执行CreateTableAs报ORA-600错误
    HahaMil数据库(数据库操作组件)
    List(支持按笔画排序的List类)
    关于我的网站(八零家园三周年)
    走出象牙塔之Final(2014.07.07)
  • 原文地址:https://www.cnblogs.com/thisisajoke/p/11101254.html
Copyright © 2011-2022 走看看