Z
Z
ZoomEx2014-03-11 19:51:33
augmented reality
ZoomEx, 2014-03-11 19:51:33

How to find 3D camera coordinates by marker?

Based on one image, you need to determine the 3D coordinates of the camera in the coordinate system attached to the marker.
A marker is a square on a plane of known size. The origin of coordinates is one of the corners of the marker.
Marker vertices on the image have already been found.
The internal parameters of the camera are known (the camera is calibrated).
The task is reduced to finding the matrix of external camera parameters (extrinsic).
C=R|T
It is not possible to solve SLAE for calculating the full matrix of projections by 4 points on the plane - there are not enough equations. There are 12 unknowns, and only 8 equations (2 for each point).
Four can calculate the homography matrix. It got done.
How, knowing the homography matrix, calculate the camera coordinates in world coordinates (x,y,z)?
And can it be done at all?
In augmented reality applications, this problem seems to be solved.
It seems to be even with 4 points.
I want to understand the mathematics of the process, and not use functions from ready-made libraries.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Starkov, 2014-03-11
@icelaba

If in the forehead:
Let the marker be a triangle,
{X,Y}c - the camera coordinate, Vw = {X,Y,Z}w - the world coordinate
the problem is reduced to solving the equations
Xw0/Zw0 = Xc0
Yw0/Zw0 = Yc0
Xw1/Zw1 = Xc1 Yw1
/Zw1 = Yc1 Xw2 /
Zw2 = Xc2 Yw2
/Zw2 = Yc2 size1 we also know about the marker, for example, let's say a rectangular triangle mul(Vw1 - Vw0, Vw2 - Vw0) = 0 9 equations 9 unknowns, there are probably several solutions .

Z
ZoomEx, 2014-03-12
@ZoomEx

If you manage to solve such a system (it is somewhat simplified in terms of the internal parameters of the camera: focus, main point, etc., but essentially the same), then the
result will be the values ​​of the world coordinates of 3 marker points in the report system attached to the camera.
To solve my problem, then it will be necessary to change the basis: move the origin to one of these points, expand the axes along the legs of the triangle. In other words, you need to find the Euclidean transformation matrix. That is, solve the system of equations again.
3 points will not give a sufficient number of equations to solve it.
The original reduced system of equations with a triangle is non-linear, and for me it is not a fact that it will be solved.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question