# Find Orthonormal Basis for Image Plane Given Camera Matrix

Given a projection matrix $P = [M | p_4]$, ($M \in 3 \times 3$, $p_4 \in 3 \times 1$), the principal axis (the vector that passes through the center of projection and is perpendicular to the image plane) $v$ is $$v = det(M)m_3$$ where $m_3$ is the third row of $M$. Is this correct?

Now I want to find two more vectors, say $v_1$ and $v_2$, that form an orthonormal basis with $v$ and span the image plane. I know that $v_1$ and $v_2$ are not unique so I want them to be equal to the $x$- and $y$-axes once the principal axis coincides with the $z$-axis (of some world coordinate system). If the principal axis differs from the $z$-axis due to some transformation I want that same transformation to give me $v_1$ and $v_2$ if applied to the $x$- and $y$-axes. Hope you get what I mean by that!

Thanks in advance!

-

Your requirement still does not force a unique representation: you can rotate about the $z$ axis while maintaining alignment of that axis with your principal axis. As a consequence, “that same transformation” isn't well defined. Basically you want two more vectors orthogonal to $m_3$, right? Simply compute the cross product between that axis and any vector, and the result will be orthogonal. If may be zero, so take the cross product with the three unit vectors and choose the result with maximal length as $v_1$. You can then compute $v_2=m_3\times v_1$. – MvG Nov 14 '12 at 17:54
Hmmmmm i see :( ... what if I know the extrinsic parameters of my camera? Doesn't that give me that transformation? – Yasmin Nov 15 '12 at 9:29
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 23, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9151535630226135, "perplexity_flag": "head"}