## Calculate camera position from 3x4 projection matrix

### Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)

I have a 3 x 4 projection matrix $P$ given that calculates a homogeneous 2-Vector ${\bf i}=(u,v,w)^T$ on some screen (e.g.) from a homogeneous 3-Vector ${\bf x}=(x,y,z,w)^T$ in world space by $P \cdot {\bf x} = {\bf i}$.

How can I calculate the position of the camera in world space from that?

-

1
Dear Jakob, no offense intended, but this forum is for research-level math questions, and I fear that yours isn't quite. You might have more luck at the related site: math.stackexchange.com – André Henriques Jun 21 2011 at 14:12

1
thanks for your hint - i really was not aware that there are two maths sites in the stackoverflow universe. i'll give it a try. – Jakob Jun 21 2011 at 16:23

## 2 Answers

Sorry for answering my own question, but just now a colleague told me the solution and I want to share it - maybe it is of some use for anybody else some day.

1. Separate $P$ into a 3x3 matrix $P'$ (including the first three columns) and a vector $\bf F'$ (the last column).
2. Invert $P'$
3. The projection reference point (i.e., the 'camera') is then ${\bf F}=P'^{-1} \cdot {\bf F'}$.
-

### You can accept an answer to one of your own questions by clicking the check mark next to it. This awards 15 reputation points to the person who answered and 2 reputation points to you.

Check out

Computer Graphics: Principles and Practice in C (2nd Edition) by James D. Foley, Andries van Dam, Steven K. Feiner and John F. Hughes (Hardcover - Aug 14, 1995)

And all will be revealed.

-

thank you for your suggestion. i will have a deeper look into it, but at first sight the book does not really seem to answer my question. – Jakob Jun 21 2011 at 16:25
{"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": 9, "mathjax_display_tex": 0, "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.9185968041419983, "perplexity_flag": "middle"}