00001 /* ======================================================================== 00002 * PROJECT: ARToolKitPlus 00003 * ======================================================================== 00004 * 00005 * The robust pose estimator algorithm has been provided by G. Schweighofer 00006 * and A. Pinz (Inst.of El.Measurement and Measurement Signal Processing, 00007 * Graz University of Technology). Details about the algorithm are given in 00008 * a Technical Report: TR-EMT-2005-01, available at: 00009 * http://www.emt.tu-graz.ac.at/publications/index.htm 00010 * 00011 * Ported from MATLAB to C by T.Pintaric (Vienna University of Technology). 00012 * 00013 * Copyright of the derived and new portions of this work 00014 * (C) 2006 Graz University of Technology 00015 * 00016 * This framework is free software; you can redistribute it and/or modify 00017 * it under the terms of the GNU General Public License as published by 00018 * the Free Software Foundation; either version 2 of the License, or 00019 * (at your option) any later version. 00020 * 00021 * This framework is distributed in the hope that it will be useful, 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 * GNU General Public License for more details. 00025 * 00026 * You should have received a copy of the GNU General Public License 00027 * along with this framework; if not, write to the Free Software 00028 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00029 * 00030 * For further information please contact 00031 * Dieter Schmalstieg 00032 * <schmalstieg@icg.tu-graz.ac.at> 00033 * Graz University of Technology, 00034 * Institut for Computer Graphics and Vision, 00035 * Inffeldgasse 16a, 8010 Graz, Austria. 00036 * ======================================================================== 00037 ** @author Thomas Pintaric 00038 * 00039 * $Id: rpp.h 162 2006-04-19 21:28:10Z grabner $ 00040 * @file 00041 * ======================================================================== */ 00042 00043 00044 #ifndef __RPP_H__ 00045 #define __RPP_H__ 00046 00047 #include "rpp_types.h" 00048 00049 namespace rpp { 00050 // ------------------------------------------------------------------------------------------ 00051 void Quaternion_byAngleAndVector(quat_t &Q, const real_t &q_angle, const vec3_t &q_vector); 00052 void GetRotationbyVector(mat33_t &R, const vec3_t &v1, const vec3_t &v2); 00053 void xform(vec3_array &Q, const vec3_array &P, const mat33_t &R, const vec3_t &t); 00054 void xformproj(vec3_array &Qp, const vec3_array &P, const mat33_t &R, const vec3_t &t); 00055 void rpyMat(mat33_t &R, const vec3_t &rpy); 00056 void rpyAng(vec3_t &angs, const mat33_t &R); 00057 void rpyAng_X(vec3_t &ang_zyx, const mat33_t &R); 00058 void decomposeR(mat33_t &Rz, const mat33_t &R); 00059 void abskernel(mat33_t &R, vec3_t &t, vec3_array &Qout, real_t &err2, 00060 const vec3_array _P, const vec3_array _Q, 00061 const mat33_array F, const mat33_t G); 00062 void objpose(mat33_t &R, vec3_t &t, unsigned int &it, real_t &obj_err, real_t &img_err, 00063 bool calc_img_err, const vec3_array _P, const vec3_array Qp, const options_t options); 00064 void getRotationY_wrtT(scalar_array &al_ret, vec3_array &tnew, const vec3_array &v, 00065 const vec3_array &p, const vec3_t &t, const real_t &DB, 00066 const mat33_t &Rz); 00067 void getRfor2ndPose_V_Exact(pose_vec &sol, const vec3_array &v, const vec3_array &P, 00068 const mat33_t R, const vec3_t t, const real_t DB); 00069 void get2ndPose_Exact(pose_vec &sol, const vec3_array &v, const vec3_array &P, 00070 const mat33_t R, const vec3_t t, const real_t DB); 00071 00072 // ------------------------------------------------------------------------------------------ 00073 void robust_pose(real_t &err, mat33_t &R, vec3_t &t, 00074 const vec3_array &_model, const vec3_array &_iprts, 00075 const options_t _options); 00076 // ------------------------------------------------------------------------------------------ 00077 } // namespace rpp 00078 00079 #endif