We have moved! Please visit us at ANTHROECOLOGY.ORG. This website is for archival purposes only.

Feb 01 2012

Some Thoughts on Fixing the Helmert Problem

I've gotten to a point where I think I understand what our coordinate transform code has been doing wrong, and how to fix it.

1. We start with our object, as it appears to us.

2. Because the Z variation is very low, it does not constrain the Helmert optimization process from picking a negative scale.  As it stands, if you take perfectly precise/accurate GCPs, and a perfect pointcloud, and try to fit it, there is a bifurcated optimization: half the time you end up with a perfect fit, half the time you end up with a good fit that inverts Z values.  A negatively-scaled pointcloud will be proportional, but chirally incorrect: There is no way to rotate it to fit it to the actual reference points.  It is "backwards".

3. Absent a significant Z variation, if the optimization ends up on the negative scale end, it will fit the points by rotating them so that the ground plane approximately matches, which will be approximately 180 degrees about the Z axis (blue in this diagram).

4. We do have a way to detect this and flat-out reject it (the scale parameter being negative), but as flawed as they are, these initial parameters accomplish an important task: they select a somewhat accurate up-down axis, and they determine the approximate magnitude of the scale.  Therefore, it is preferable to fix the fit rather than throwing it away.

To fix it, we can do some of the steps of the transform in reverse, without any optimization.

5. First, apply the Helmert transform parameters we initially determined.  Then, if the transform is negative, apply additional steps.

6. Step A) Apply a scale transform of negative 1.

7. Step B) Apply a 180 degree rotation about the Z axis.

8. Step C) Recenter based on centroid translation to get an approximate fit to reality.

 9. Step D) Run the Helmert optimization again.  With the residuals already minimized by a mostly well-fit system, it is unlikely to iteratively choose a negative scale again, but will tweak the rotation and translation to line things up closely.

blog comments powered by Disqus