

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer


share|cite|improve this question





share|cite|improve this answer



share|cite|improve this answer

coffeemath explained why you cannot find an unique such matrix.





share|cite|improve this answer





share|cite|improve this answer

No, but if you provide two direction wedges, where the two wedges have identical angular width, you can find the unique 3x3 matrix rotator that transforms the input wedge into the output wedge.

What is a direction wedge? It is an ordered pair of direction vectors, d1 d2. Each is a 3D direction vector (a unit vector used to represent pointing direction in 3D space). A 3D direction vector is equivalent to a point on the unit sphere [ x, y, z]. There is a 1:1 mapping of directions in 3-space to points on the unit sphere, thus to its numerical representation as a unique point on that sphere. This is highly advantageous for algorithmic development, as the exception cases (singularity, ambiguity, discontinuity) are avoided, while achieving symmetry among the x-y-z features. There is only one point in 3D lacking a direction (the origin).

Back to wedges. What is an example of a wedge? It's just an ordered pair of two distinct directions. You could be standing on the shoreline in San Francisco, and measure the directions to the two suspension peaks of the Golden Gate Bridge. To make a wedge, you just need to be clear about their order...[ dir_south_peak, dir_north_peak ]. Those two directions form a 3D pie wedge going out from where you are standing. The only restriction on d1 and d2 is they may not be coincident or opposite directions. Another way to say this is, the angle subtended between the two directions is bracketed: 0 < angle < 180.

OK, now here's an interesting problem you can solve with this wedge. Suppose you have a camera-equipped drone or chopper at your same location. You want to determine the 3D orientation of this flying platform, and gyros are way too expensive. How can you build a camera-based software gyro?

Let's say the drone's camera is wide-angle or even a full hemispherical camera, so that it can "see" the two peaks of the Golden Gate Bridge. This camera system has its own local platform axis system x-y-z which differs from the ground X-Y-Z axes by some unknown, arbitrary 3D rotation. The ground X-Y-Z axes are reference axes X=[1 0 0], Y=[0 1 0], Z=[0 0 1]. You want to determine the value of the platform's x-y-z axes expressed as 3 orthogonal direction vectors in the reference coordinate system. That is a great way to represent the 3D orientation of the drone - they'll only be one unique numerical representation for one spatial orientation! Something you're not going to achieve with Euler angle triplet [ roll angle, pitch angle, yaw angle].

OK, so platform's x-y-z axes orientation is the unknown which we want to solve. We have the bridge peak wedge measurements [d1, d2] in reference coordinates. The 2nd wedge we need is obtained by having the drone camera measure the directions to the same two peaks. The angular width of the wedge will be the same. But the two directions will be different. They will both be "off" from the corresponding reference directions by the orientation of the drone camera. Let's call these two directional measurements [d1, d2]cam.

So now we have 2 wedges: [d1, d2 ] (bridge peak directions measured in reference coordinates) [d1, d2]cam (bridge peak directions measure by camera having unknown orientation x-y-z)

How do we solve for x-y-z?

This is called the Rotational Inference Algorithm. I need graphics to explain it, so it doesn't appear here. It is published here:

The short and skinny is that the orientation of the platform, R = [x-y-z] can be computed as:

R1 = rotator [ d1 -- (d1 x d2)norm ] (-- the y axis is determined by the x and z axes)

R2 = rotator [ d1cam -- (d1cam x d2cam)norm ]

R = R1 • inverse(R2)

Long answer, but everyone should be aware that you can build a 3D gyro out of a wide-field camera and a software number-crunching algorithm. All you need are two stable, known directional beacons that the camera can latch onto and process.

share|cite|improve this answer

Your Answer


