0 Daumen
275 Aufrufe

Matrixtransformation (wahrscheinlich trivial)fehler.png

Text erkannt:

d=Ceye Pref a~z=ddv=vup vup a~x=v×a~za~y=a~z×a~xRa=[a~xa~ya~z] \begin{aligned} \mathbf{d} & =\mathbf{C}_{\text {eye }}-\mathbf{P}_{\text {ref }} \\ \tilde{\mathbf{a}}_{z} & =\frac{\mathbf{d}}{|\mathbf{d}|} \\ \mathbf{v}^{\prime} & =\frac{\mathbf{v}_{\text {up }}}{\left|\mathbf{v}_{\text {up }}\right|} \\ \tilde{\mathbf{a}}_{x} & =\mathbf{v}^{\prime} \times \tilde{\mathbf{a}}_{z} \\ \tilde{\mathbf{a}}_{y} & =\tilde{\mathbf{a}}_{z} \times \tilde{\mathbf{a}}_{x} \\ \mathrm{R}_{a} & =\left[\begin{array}{lll} \tilde{\mathbf{a}}_{x} & \tilde{\mathbf{a}}_{y} & \tilde{\mathbf{a}}_{z} \end{array}\right] \end{aligned}

This results in:
Tcam 1=[RaRaCeye 01] \mathrm{T}_{\text {cam }}^{-1}=\left[\begin{array}{cc} \mathbf{R}_{a}^{\top} & -\mathbf{R}_{a}^{\top} \mathbf{C}_{\text {eye }} \\ \mathbf{0}^{\top} & 1 \end{array}\right]

Transformation of the Camera
- The inverse of a rotation matrix is given by the transposed matrix:
Ra1=Ra[r11r12r13r21r22r23r31r32r33]1=[r11r21r31r12r22r32r13r23r33] \begin{array}{c} \mathrm{R}_{a}^{-1}=\mathrm{R}_{a}^{\top} \\ {\left[\begin{array}{lll} r_{11} & r_{12} & r_{13} \\ r_{21} & r_{22} & r_{23} \\ r_{31} & r_{32} & r_{33} \end{array}\right]^{-1}=\left[\begin{array}{lll} r_{11} & r_{21} & r_{31} \\ r_{12} & r_{22} & r_{32} \\ r_{13} & r_{23} & r_{33} \end{array}\right]} \end{array}
- The inverse transformation Tcam 1 \mathrm{T}_{\text {cam }}^{-1} can be computed by:
Tcam 1=[RaCa0+1]1=[RaRaCa01] \mathrm{T}_{\text {cam }}^{-1}=\left[\begin{array}{cc} \mathrm{R}_{a} & \mathbf{C}_{a} \\ \mathbf{0}^{\top} & +1 \end{array}\right]^{-1}=\left[\begin{array}{cc} \mathbf{R}_{a}^{\top} & -\mathrm{R}_{a}^{\top} \mathbf{C}_{a} \\ \mathbf{0}^{\top} & 1 \end{array}\right]

I need the 4x4 matrix here and I'm obviously making a mistake with this transformation
Tcam1=[r11r21r31(r11×Ca1+r21×Ca2+r31×Ca3)r12r22r32(r12×Ca1+r22×Ca2+r33×Ca3)r13r23r33(r13×Ca1+r23×Ca2+r33×Ca3)0001] \begin{array}{l} \mathrm{T}_{\mathrm{cam}}^{-1}=\left[\begin{array}{cccl} r_{11} & r_{21} & r_{31} & -\left(\mathrm{r}_{11} \times \mathrm{C}_{\mathrm{a} 1}+\mathrm{r}_{21} \times \mathrm{C}_{\mathrm{a} 2}+\mathrm{r}_{31} \times \mathrm{C}_{\mathrm{a} 3}\right) \\ r_{12} & r_{22} & r_{32} & -\left(\mathrm{r}_{12} \times \mathrm{C}_{\mathrm{a} 1}+\mathrm{r}_{22} \times \mathrm{C}_{\mathrm{a} 2}+\mathrm{r}_{33} \times \mathrm{C}_{\mathrm{a} 3}\right) \\ r_{13} & r_{23} & r_{33} & -\left(\mathrm{r}_{13} \times \mathrm{C}_{\mathrm{a} 1}+\mathrm{r}_{23} \times \mathrm{C}_{\mathrm{a} 2}+\mathrm{r}_{33} \times \mathrm{C}_{\mathrm{a} 3}\right) \\ \mathbf{0} & \mathbf{0} & \mathbf{0} & 1 \end{array}\right] \\ \end{array}



Ich benötige eine aus einem YouTube-Video abgeleitete Matrix. Der Fehler ist sicherlich trivial, aber die Mathematik ist für mich schon lange her. Der obere Teil des Bildes stammt aus einem YouTube-Video, der untere Teil ist von mir. Die Umformung für die resultierende 4x4-Matrix schient nicht richtig zu sein.


Avatar von

1 Antwort

0 Daumen

Da geht es um eine Abbildung in homogenen Koordinaten...

Für einen konkreten Nachbau erhalte ich z.B.

Rα : =(0513121310001213513),Ceye=(2,32,3)\small R_\alpha \, := \, \left(\begin{array}{rrr}0&\frac{5}{13}&\frac{-12}{13}\\-1&0&0\\0&\frac{12}{13}&\frac{5}{13}\\\end{array}\right), C_{eye}=\left(-2, \frac{3}{2}, 3 \right)

Tcam : =(051312132100320121351330001)\small T_{cam} \, := \, \left(\begin{array}{rrrr}0&\frac{5}{13}&\frac{-12}{13}&-2\\-1&0&0&\frac{3}{2}\\0&\frac{12}{13}&\frac{5}{13}&3\\0&0&0&1\\\end{array}\right)

und

Tcam1 : =(010325130121321213051330001)\small T_{cam}^{-1} \, := \, \left(\begin{array}{rrrr}0&-1&0&\frac{3}{2}\\\frac{5}{13}&0&\frac{12}{13}&-2\\\frac{-12}{13}&0&\frac{5}{13}&-3\\0&0&0&1\\\end{array}\right)

und das passt dann auch....

Avatar von 21 k

Ein anderes Problem?

Stell deine Frage