Main Page | Modules | Class List | File List | Class Members | File Members

homog33_fit.h

Go to the documentation of this file.
00001 
00014 /* This library is free software; you can redistribute it and/or
00015    modify it under the terms of the GNU Lesser General Public
00016    License as published by the Free Software Foundation; either
00017    version 2.1 of the License, or (at your option) any later version.
00018 
00019    This library is distributed in the hope that it will be useful,
00020    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022    Lesser General Public License for more details.
00023 
00024    You should have received a copy of the GNU Lesser General Public
00025    License along with this library; if not, write to the Free Software
00026    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027 */
00028 
00029 #ifndef _GAN_HOMOG33_FIT_H
00030 #define _GAN_HOMOG33_FIT_H
00031 
00032 #include <gandalf/linalg/3vector.h>
00033 #include <gandalf/linalg/3x3matrix.h>
00034 #include <gandalf/linalg/mat_square.h>
00035 #include <gandalf/linalg/symmat_eigen.h>
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040 
00054 typedef enum
00055 {
00056    GAN_HOMOG33_POINT, 
00057    GAN_HOMOG33_LINE, 
00058    GAN_HOMOG33_LINE_ENDPOINTS, 
00059    GAN_HOMOG33_IGNORE 
00060 }
00061 Gan_Homog33MatchType;
00062 
00067 typedef struct
00068 {
00069    Gan_Homog33MatchType type;
00070    union
00071    {
00072       struct { Gan_Vector3 X, x; } p; 
00073       struct { Gan_Vector3 L, l; } l; 
00074       struct { Gan_Vector3 X1, X2, l; } le; 
00076    } d;
00077 } Gan_Homog33Match;
00078 
00087  Gan_SymMatEigenStruct *gan_homog33_init ( Gan_SymMatEigenStruct *sme );
00088 
00098  void gan_homog33_free ( Gan_SymMatEigenStruct *sme );
00099 
00100  Gan_Bool gan_homog33_increment_p ( Gan_SymMatEigenStruct *sme,
00101                                    Gan_Vector3 *X, Gan_Vector3 *x,
00102                                    double scale, int *eq_count );
00103  Gan_Bool gan_homog33_increment_l ( Gan_SymMatEigenStruct *sme,
00104                                    Gan_Vector3 *L, Gan_Vector3 *l,
00105                                    double scale,
00106                                    int *eq_count );
00107  Gan_Bool gan_homog33_increment_le ( Gan_SymMatEigenStruct *sme,
00108                                     Gan_Vector3 *X, Gan_Vector3 *l,
00109                                     double scale, int *eq_count );
00110  Gan_Bool gan_homog33_solve ( Gan_SymMatEigenStruct *sme, int eq_count,
00111                              Gan_Matrix33 *P );
00112  Gan_Bool gan_homog33_fit ( Gan_Homog33Match *match, unsigned nmatches,
00113                            Gan_Matrix33 *H );
00114  Gan_Bool gan_homog33_fit_points ( const Gan_Vector3 *x, const Gan_Vector3 *X,
00115                                   unsigned int n, Gan_Matrix33 *H );
00116 
00126  Gan_Bool gan_homog33_reset ( Gan_SymMatEigenStruct *sme );
00127 
00136 #ifdef __cplusplus
00137 }
00138 #endif
00139 
00140 #endif /* #ifndef _GAN_HOMOG33_FIT_H */

Generated on Fri Mar 17 12:44:47 2006 by  doxygen 1.3.9.1