How to find the 3D coordinates of the projected rectangle?

I have the following problem, which is mostly algorithmic.

  • Let ABCD be a rectangle with known dimensions d1, d2 lying somewhere in space.
  • The rectangle ABCD is projected onto the plane P (forming in the general case the trapezoid KLMN). I know the projection matrix H.
  • I can also find the 2D coordinates of the trapezoid edge points K, L, M, N.

The question is:

  • Given the projection matrix H, the coordinates of the edges on the trapezoid, and the knowledge that our object is a rectangle with a given geometry (dimensions d1, d2), could we calculate the 3D coordinates of points A, B, C, D?

I capture images of simple rectangles with a single camera, and I want to restore the rectangles in space. I could capture more than one image and use triangulation, but this is undesirable.

The projection matrix is ​​not enough, since the beam is projected to the same point. The fact that the object is of known size makes me believe that the problem is solvable and there are final solutions.

If I figure out how this reconstruction can be done, I know how to program it. So I ask for an algorithmic / mathematical answer.

Any ideas are welcome Thanks

+3
source share
5 answers

You need to calculate the inverse projection matrix. (your matrix cannot be singular)

+1

, , , 2D. 2D-:

           |   
-----------+-----------
          /|\
         / | \
        /  |  \
       /---+---\VP
      /    |    \
     /     |     \
    /      |      \
   /       |       \
  /        |   --   \
 /         |    |    \
/          |    |     \

(VP). , , , . - , , .

, 2D .

3D?

:

  • , ,
  • . , , , .

EDIT: , .

EDIT V2:

, Rn - , .. , m.Rn, | Rn | . , :

P1 = aR1
P2 = bR2
P3 = cR3
P4 = dR4

P1..P4 - . , , :

|aR1 - bR2| = d1
|cR3 - dR4| = d1
|aR1 - cR3| = d2
|bR2 - dR4| = d2

d1 d2 - , a, b, c d - .

, d1 d2. :

(a.R1x - b.R2x) 2 + (a.R1y - b.R2y) 2 + (a.R1z - b.R2z) 2= d1 2

R1? R2? x/y/z 1 2. , a b , x, y, z.

+1

, , , . , 3x4 (P), , P: C.

, C, , CK, CL, CM CN (.. C K, L, M N, CxK)

3 (u1, u2, u3), 6 ( , KL KN || KL || >= || KN ||, d1 >= d2):

  • u1 CK, u1.CK = 0
  • u2 CL
  • u3 CN
  • || u1-u2 || = d1
  • || u1-u3 || = d2
  • (u1xu2). (u1xu3) = 0 ()

A.B = A B     || || = A      AxB = A B

+1

m_oLogin . , , , P, ? , K, L, M, N 2D-. A, B, C D. .

, , , GPS - : "" P "", , ?

0

, , , . , , , - , .

0

Source: https://habr.com/ru/post/1704508/


All Articles