0 Daumen
95 Aufrufe

Matrixtransformation (wahrscheinlich trivial)fehler.png

Text erkannt:

\( \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:
\( \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:
\( \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 \( \mathrm{T}_{\text {cam }}^{-1} \) can be computed by:
\( \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
\( \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.

\(\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) \)

\(\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

\(\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

Willkommen bei der Mathelounge! Stell deine Frage einfach und kostenlos

x
Made by a lovely community