next up previous contents
Next: Computing a homography between Up: Computing a homography between Previous: Computing a 2D homography   Contents

Computing a 2D affine homography

      #include <gandalf/vision/affine33_fit.h>
If the region of the scene in which a homography is to be computed is small, or a long focal length lens is being used, an affine 2D model of motion is usually adequate, and indeed computing a full projective model can become unstable. The function defined in this module is a version of gan_homog33_fit() for computing an affine 2D homography, which can be formed from a full projective homography by imposing the constraints $P_{31}=P_{32}=0$, $P_{33}=1$. To fit an affine 2D homography replace the call to gan_homog33_fit() in the above code fragment with
      /* fit affine 2D homography */
      gan_affine33_fit ( aMatch, uiNoMatches, &m33P );

Error detection: gan_affine33_fit() returns a boolean value; hence GAN_FALSE is returned on error and the Gandalf error handler is invoked.



2006-03-17