R
R
Roman Koff2015-08-12 17:25:00
Mathematics
Roman Koff, 2015-08-12 17:25:00

How to get the coordinates of an object from a photo?

More specifically, what mathematical tools can be used to solve such a problem?
b03feccd855248cfaf0ba1e4d311bbfd.jpg
There are two photographs of the object (upper casing) taken from two angles.
In the photographs, there is also a standard coordinate system with marked units along the X, Y, Z axes and the origin "0" (box below).
The photographs are used to calculate the two-dimensional coordinates of the projections of all points (the tops of the trapezium of the casing, the point of the origin of coordinates and the points of single segments of the standard along three axes).
Photo 1 Photo 2
x0 y0 x1 y1
X) 59 34 94 -10
Y) 1 -74 6 -83
Z) -54 32 35 55
1) -77 758 -14 862
2) -99 788 -45 890
3) 175 732 469 919
4) 163 715 437 886
It is necessary to obtain the coordinates of the vertices of the upper casing in the standard coordinate system. In the future, on the basis of this, knowing the dimension of the unit of the standard, it will be possible to calculate the dimensions of the casing.
Standard unit size: 20 cm
Actual dimensions of the casing for checking formulas:
top side: 98.5 cm
bottom side: 86.5 cm
sides: 5.5 cm

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Makarov, 2015-08-12
@Nipheris

So, first of all, we can talk about the presence of two coordinate systems - the world and the observer (view, if in terms of graphics). Any transformation from the three-dimensional world to the three-dimensional CS of the observer can be carried out using some 4x4 matrix V. That is:
(xv, yv, zv, 1) = V * (xw, yw, zw, 1)
where (xv, yv, zv) are the coordinates of the casing in the photo, and xw, yw, zw are we need to get to calculate the size.
There are two tasks:
1) calculate V
2) because We don’t have zv (there is no rangefinder in the camera), then it will need to be determined by the offset in two photographs. Then we can talk about TWO matrices V1 and V2, and solve the system of equations:
(xv1, yv1, zv1, 1) = V1 * (xw1, yw1, zw1, 1)
(xv2, yv2, zv2, 1) = V2 * (xw2 , yw2, zw2, 1)
Unknown to us: zv1, zv2; xw1, yw1, zw1; xw2, yw2, zw2. In theory, there will also be 8 equations after the disclosure of the matrix multiplication operation, so the system must be solved (of course, if V1 and V2 have already been found).
Look for V1 and V2, obviously, by the box. For this box, the world coordinates are known, and the coordinates in the photograph. Those. in the expression:
(xv, yv, zv, 1) = V * (xw, yw, zw)
Unknown to you: zv and all matrix elements, of which there are 16 pieces (maybe less, you need to think about what exactly this matrix is, including perspective projection). In theory, you can dial the required number of reference points on the box to find all the elements of the matrix.

R
Roman Koff, 2015-08-12
@Zarinov

Thanks for the specific tip, there is now a clear light at the end of the tunnel! And then I puzzled over which side to approach.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question