<p>Lets say I have a rectangle with known coordinates in 3D scene, and I'm projecting it using pin point camera to the plane (screen).</p>
<p>You can imagine it deforms on the screen per camera transformation and projection.</p>
<p>And I know the resulting project 2D coordinates on the screen.</p>
<p>I wonder if I can recover camera parameters (projection matrix, transformation, field of view, distance from the screen and from the object) from known coordinates of the rectangle in 3d and know coordinates/results for 2d projection.</p>
<p>Thank you.</p>
<p>PS: if this task has infinite many solutions or unsolvable - what a minimum extra information I could gather or add to actually solve it ?</p>
<p>UPDATE (08/08/22):
Found this lecture notes that seems to describe similar problem and call it Camera Calibration - <a href="https://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/EPSRC_SSAZ/node5.html#SECTION00050000000000000000" rel="nofollow noreferrer">https://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/EPSRC_SSAZ/node5.html#SECTION00050000000000000000</a></p>
<p>Similar questions were discussed at StackOverflow:
<a href="https://stackoverflow.com/questions/64613719/recover-a-projection-matrix-with-known-3d-and-2d-points">https://stackoverflow.com/questions/64613719/recover-a-projection-matrix-with-known-3d-and-2d-points</a></p>
<p>And here is module that seems to solve this problem - <a href="https://docs.opencv.org/3.4/d9/d0c/group__calib3d.html" rel="nofollow noreferrer">https://docs.opencv.org/3.4/d9/d0c/group__calib3d.html</a></p>
<p>I'll try it out, for now would consider this to be a solved question.</p>

CC BY-SA 4.0
2022-08-04T19:00:18.130Z
Camera has 7 degrees of freedom you have 8 points with 2 degrees each. So yeah should be possible.
joojaa
CC BY-SA 4.0
2022-08-04T21:22:37.763Z
I think the near/far planes of the projection matrix could be a problem, nevertheless the 2d coordinate will always be the same...
Thomas
<3d><transformations><projections><camera><camera-matrix>
Finding Camera projection matrix from known input and output
Eduard Kovalets
# Finding Camera projection matrix from known input and output

(Asked by: username_0 on 2022-08-04)

Lets say I have a rectangle with known coordinates in 3D scene, and I'm projecting it using pin point camera to the plane (screen).

You can imagine it deforms on the screen per camera transformation and projection.

And I know the resulting project 2D coordinates on the screen.

I wonder if I can recover camera parameters (projection matrix, transformation, field of view, distance from the screen and from the object) from known coordinates of the rectangle in 3d and know coordinates/results for 2d projection.

Thank you.

PS: if this task has infinite many solutions or unsolvable - what a minimum extra information I could gather or add to actually solve it ?

UPDATE (08/08/22):
Found this lecture notes that seems to describe similar problem and call it Camera Calibration - <https://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/EPSRC_SSAZ/node5.html#SECTION00050000000000000000>

Similar questions were discussed at StackOverflow:
<https://stackoverflow.com/questions/64613719/recover-a-projection-matrix-with-known-3d-and-2d-points>

And here is module that seems to solve this problem - <https://docs.opencv.org/3.4/d9/d0c/group__calib3d.html>

I'll try it out, for now would consider this to be a solved question.

**Tags:** 3d, transformations, projections, camera, camera-matrix

> **Comments:**
> **username_1**: Camera has 7 degrees of freedom you have 8 points with 2 degrees each. So yeah should be possible.  
> **username_2**: I think the near/far planes of the projection matrix could be a problem, nevertheless the 2d coordinate will always be the same...  

---

## 0 answers

