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 $$
  • 相关阅读:
    jacob使用入门及问题解析
    java通过jacob来读取word转换为htm格式
    Java操作Microsoft Word之jacob
    将一个项目导入到另一个项目里
    N个富文本编辑器/基于Web的HTML编辑器
    VirtualBox虚拟机网络设置(四种方式)
    (重置adb.exe)android关于The connection to adb is down, and a severe error has occured.这个问题的解决办法
    对java3d的位置理解
    作为Web开发人员,我为什么喜欢Google Chrome浏览器
    非阻塞同步机制与CAS操作
  • 原文地址:https://www.cnblogs.com/thisisajoke/p/11101254.html
Copyright © 2011-2022 走看看