亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? eucsbademo.c

?? sba, a C/C++ package for generic sparse bundle adjustment is almost invariably used as the last step
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* Euclidean bundle adjustment demo using the sba package */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <time.h>#include <sba.h>#include "eucsbademo.h"#include "readparams.h"#define CLOCKS_PER_MSEC (CLOCKS_PER_SEC/1000.0)#define MAXITER         100/* pointers to additional data, used for computed image projections and their jacobians */struct globs_{	double *intrcalib; /* the 5 intrinsic calibration parameters in the order [fu, u0, v0, ar, skew],                      * where ar is the aspect ratio fv/fu.                      * Used only when calibration is fixed for all cameras;                      * otherwise, it is null and the intrinsic parameters are                      * included in the set of motion parameters for each camera                      */  int nccalib; /* number of calibration parameters that must be kept constant.                * 0: all paremeters are free                 * 1: skew is fixed to its initial value, all other parameters vary (i.e. fu, u0, v0, ar)                 * 2: skew and aspect ratio are fixed to their initial values, all other parameters vary (i.e. fu, u0, v0)                * 3: meaningless                * 4: skew, aspect ratio and principal point are fixed to their initial values, only the focal length varies (i.e. fu)                * >=5: meaningless                * Used only when calibration varies among cameras                */  int cnp, pnp, mnp; /* dimensions */	double *ptparams; /* needed only when bundle adjusting for camera parameters only */	double *camparams; /* needed only when bundle adjusting for structure parameters only */} globs;/* Routines to estimate the estimated measurement vector (i.e. "func") and * its sparse jacobian (i.e. "fjac") needed in BA. Code below makes use of the * routines calcImgProj() and calcImgProjJacXXX() which * compute the predicted projection & jacobian of a SINGLE 3D point (see imgproj.c). * In the terminology of TR-340, these routines compute Q and its jacobians A=dQ/da, B=dQ/db. * Notice also that what follows is two pairs of "func" and corresponding "fjac" routines. * The first is to be used in full (i.e. motion + structure) BA, the second in  * motion only BA. *//****************************************************************************************//* MEASUREMENT VECTOR AND JACOBIAN COMPUTATION FOR VARYING CAMERA POSE AND 3D STRUCTURE *//****************************************************************************************//*** MEASUREMENT VECTOR AND JACOBIAN COMPUTATION FOR THE SIMPLE DRIVERS ***//* FULL BUNDLE ADJUSTMENT, I.E. SIMULTANEOUS ESTIMATION OF CAMERA AND STRUCTURE PARAMETERS *//* Given the parameter vectors aj and bi of camera j and point i, computes in xij the * predicted projection of point i on image j */static void img_projRTS(int j, int i, double *aj, double *bi, double *xij, void *adata){  double *Kparms;  struct globs_ *gl;  gl=(struct globs_ *)adata;  Kparms=gl->intrcalib;  calcImgProj(Kparms, aj, aj+3, bi, xij); // 3 is the quaternion's vector part length}/* Given the parameter vectors aj and bi of camera j and point i, computes in Aij, Bij the * jacobian of the predicted projection of point i on image j */static void img_projRTS_jac(int j, int i, double *aj, double *bi, double *Aij, double *Bij, void *adata){  double *Kparms;  struct globs_ *gl;    gl=(struct globs_ *)adata;  Kparms=gl->intrcalib;  calcImgProjJacRTS(Kparms, aj, aj+3, bi, (double (*)[6])Aij, (double (*)[3])Bij); // 3 is the quaternion's vector part length}/* BUNDLE ADJUSTMENT FOR CAMERA PARAMETERS ONLY *//* Given the parameter vector aj of camera j, computes in xij the * predicted projection of point i on image j */static void img_projRT(int j, int i, double *aj, double *xij, void *adata){  int pnp;  double *Kparms, *ptparams;  struct globs_ *gl;  gl=(struct globs_ *)adata;  pnp=gl->pnp;  Kparms=gl->intrcalib;  ptparams=gl->ptparams;  calcImgProj(Kparms, aj, aj+3, ptparams+i*pnp, xij); // 3 is the quaternion's vector part length}/* Given the parameter vector aj of camera j, computes in Aij * the jacobian of the predicted projection of point i on image j */static void img_projRT_jac(int j, int i, double *aj, double *Aij, void *adata){  int pnp;  double *Kparms, *ptparams;  struct globs_ *gl;    gl=(struct globs_ *)adata;  pnp=gl->pnp;  Kparms=gl->intrcalib;  ptparams=gl->ptparams;  calcImgProjJacRT(Kparms, aj, aj+3, ptparams+i*pnp, (double (*)[6])Aij); // 3 is the quaternion's vector part length}/* BUNDLE ADJUSTMENT FOR STRUCTURE PARAMETERS ONLY *//* Given the parameter vector bi of point i, computes in xij the * predicted projection of point i on image j */static void img_projS(int j, int i, double *bi, double *xij, void *adata){  int cnp;  double *Kparms, *camparams, *aj;  struct globs_ *gl;  gl=(struct globs_ *)adata;  cnp=gl->cnp;  Kparms=gl->intrcalib;  camparams=gl->camparams;  aj=camparams+j*cnp;  calcImgProj(Kparms, aj, aj+3, bi, xij); // 3 is the quaternion's vector part length}/* Given the parameter vector bi of point i, computes in Bij * the jacobian of the predicted projection of point i on image j */static void img_projS_jac(int j, int i, double *bi, double *Bij, void *adata){  int cnp;  double *Kparms, *camparams, *aj;  struct globs_ *gl;    gl=(struct globs_ *)adata;  cnp=gl->cnp;  Kparms=gl->intrcalib;  camparams=gl->camparams;  aj=camparams+j*cnp;  calcImgProjJacS(Kparms, aj, aj+3, bi, (double (*)[3])Bij); // 3 is the quaternion's vector part length}/*** MEASUREMENT VECTOR AND JACOBIAN COMPUTATION FOR THE EXPERT DRIVERS ***//* FULL BUNDLE ADJUSTMENT, I.E. SIMULTANEOUS ESTIMATION OF CAMERA AND STRUCTURE PARAMETERS *//* Given a parameter vector p made up of the 3D coordinates of n points and the parameters of m cameras, compute in * hx the prediction of the measurements, i.e. the projections of 3D points in the m images. The measurements * are returned in the order (hx_11^T, .. hx_1m^T, ..., hx_n1^T, .. hx_nm^T)^T, where hx_ij is the predicted * projection of the i-th point on the j-th camera. * Notice that depending on idxij, some of the hx_ij might be missing * */static void img_projsRTS_x(double *p, struct sba_crsm *idxij, int *rcidxs, int *rcsubs, double *hx, void *adata){  register int i, j;  int cnp, pnp, mnp;  double *pa, *pb, *pqr, *pt, *ppt, *pmeas, *Kparms;  //int n;  int m, nnz;  struct globs_ *gl;  gl=(struct globs_ *)adata;  cnp=gl->cnp; pnp=gl->pnp; mnp=gl->mnp;  Kparms=gl->intrcalib;  //n=idxij->nr;  m=idxij->nc;  pa=p; pb=p+m*cnp;  for(j=0; j<m; ++j){    /* j-th camera parameters */    pqr=pa+j*cnp;    pt=pqr+3; // quaternion vector part has 3 elements    nnz=sba_crsm_col_elmidxs(idxij, j, rcidxs, rcsubs); /* find nonzero hx_ij, i=0...n-1 */    for(i=0; i<nnz; ++i){      ppt=pb + rcsubs[i]*pnp;      pmeas=hx + idxij->val[rcidxs[i]]*mnp; // set pmeas to point to hx_ij      calcImgProj(Kparms, pqr, pt, ppt, pmeas); // evaluate Q in pmeas    }  }}/* Given a parameter vector p made up of the 3D coordinates of n points and the parameters of m cameras, compute in * jac the jacobian of the predicted measurements, i.e. the jacobian of the projections of 3D points in the m images. * The jacobian is returned in the order (A_11, ..., A_1m, ..., A_n1, ..., A_nm, B_11, ..., B_1m, ..., B_n1, ..., B_nm), * where A_ij=dx_ij/db_j and B_ij=dx_ij/db_i (see HZ). * Notice that depending on idxij, some of the A_ij, B_ij might be missing * */static void img_projsRTS_jac_x(double *p, struct sba_crsm *idxij, int *rcidxs, int *rcsubs, double *jac, void *adata){  register int i, j;  int cnp, pnp, mnp;  double *pa, *pb, *pqr, *pt, *ppt, *pA, *pB, *Kparms;  //int n;  int m, nnz, Asz, Bsz, ABsz, idx;  struct globs_ *gl;    gl=(struct globs_ *)adata;  cnp=gl->cnp; pnp=gl->pnp; mnp=gl->mnp;  Kparms=gl->intrcalib;  //n=idxij->nr;  m=idxij->nc;  pa=p; pb=p+m*cnp;  Asz=mnp*cnp; Bsz=mnp*pnp; ABsz=Asz+Bsz;  for(j=0; j<m; ++j){    /* j-th camera parameters */    pqr=pa+j*cnp;    pt=pqr+3; // quaternion vector part has 3 elements    nnz=sba_crsm_col_elmidxs(idxij, j, rcidxs, rcsubs); /* find nonzero hx_ij, i=0...n-1 */    for(i=0; i<nnz; ++i){      ppt=pb + rcsubs[i]*pnp;      idx=idxij->val[rcidxs[i]];      pA=jac + idx*ABsz; // set pA to point to A_ij      pB=pA  + Asz; // set pB to point to B_ij      calcImgProjJacRTS(Kparms, pqr, pt, ppt, (double (*)[6])pA, (double (*)[3])pB); // evaluate dQ/da, dQ/db in pA, pB    }  }}/* BUNDLE ADJUSTMENT FOR CAMERA PARAMETERS ONLY *//* Given a parameter vector p made up of the parameters of m cameras, compute in * hx the prediction of the measurements, i.e. the projections of 3D points in the m images. * The measurements are returned in the order (hx_11^T, .. hx_1m^T, ..., hx_n1^T, .. hx_nm^T)^T, * where hx_ij is the predicted projection of the i-th point on the j-th camera. * Notice that depending on idxij, some of the hx_ij might be missing * */static void img_projsRT_x(double *p, struct sba_crsm *idxij, int *rcidxs, int *rcsubs, double *hx, void *adata){  register int i, j;  int cnp, pnp, mnp;  double *pqr, *pt, *ppt, *pmeas, *Kparms, *ptparams;  //int n;  int m, nnz;  struct globs_ *gl;  gl=(struct globs_ *)adata;  cnp=gl->cnp; pnp=gl->pnp; mnp=gl->mnp;  Kparms=gl->intrcalib;  ptparams=gl->ptparams;  //n=idxij->nr;  m=idxij->nc;  for(j=0; j<m; ++j){    /* j-th camera parameters */    pqr=p+j*cnp;    pt=pqr+3; // quaternion vector part has 3 elements    nnz=sba_crsm_col_elmidxs(idxij, j, rcidxs, rcsubs); /* find nonzero hx_ij, i=0...n-1 */    for(i=0; i<nnz; ++i){	    ppt=ptparams + rcsubs[i]*pnp;      pmeas=hx + idxij->val[rcidxs[i]]*mnp; // set pmeas to point to hx_ij      calcImgProj(Kparms, pqr, pt, ppt, pmeas); // evaluate Q in pmeas    }  }}/* Given a parameter vector p made up of the parameters of m cameras, compute in jac * the jacobian of the predicted measurements, i.e. the jacobian of the projections of 3D points in the m images. * The jacobian is returned in the order (A_11, ..., A_1m, ..., A_n1, ..., A_nm), * where A_ij=dx_ij/db_j (see HZ). * Notice that depending on idxij, some of the A_ij might be missing * */static void img_projsRT_jac_x(double *p, struct sba_crsm *idxij, int *rcidxs, int *rcsubs, double *jac, void *adata){  register int i, j;  int cnp, pnp, mnp;  double *pqr, *pt, *ppt, *pA, *Kparms, *ptparams;  //int n;  int m, nnz, Asz, idx;  struct globs_ *gl;    gl=(struct globs_ *)adata;  cnp=gl->cnp; pnp=gl->pnp; mnp=gl->mnp;  Kparms=gl->intrcalib;  ptparams=gl->ptparams;  //n=idxij->nr;  m=idxij->nc;  Asz=mnp*cnp;  for(j=0; j<m; ++j){    /* j-th camera parameters */    pqr=p+j*cnp;    pt=pqr+3; // quaternion vector part has 3 elements    nnz=sba_crsm_col_elmidxs(idxij, j, rcidxs, rcsubs); /* find nonzero hx_ij, i=0...n-1 */    for(i=0; i<nnz; ++i){      ppt=ptparams + rcsubs[i]*pnp;      idx=idxij->val[rcidxs[i]];      pA=jac + idx*Asz; // set pA to point to A_ij      calcImgProjJacRT(Kparms, pqr, pt, ppt, (double (*)[6])pA); // evaluate dQ/da in pA    }  }}/* BUNDLE ADJUSTMENT FOR STRUCTURE PARAMETERS ONLY *//* Given a parameter vector p made up of the 3D coordinates of n points and the parameters of m cameras, compute in * hx the prediction of the measurements, i.e. the projections of 3D points in the m images. The measurements * are returned in the order (hx_11^T, .. hx_1m^T, ..., hx_n1^T, .. hx_nm^T)^T, where hx_ij is the predicted * projection of the i-th point on the j-th camera. * Notice that depending on idxij, some of the hx_ij might be missing * */static void img_projsS_x(double *p, struct sba_crsm *idxij, int *rcidxs, int *rcsubs, double *hx, void *adata){  register int i, j;  int cnp, pnp, mnp;  double *pqr, *pt, *ppt, *pmeas, *Kparms, *camparams;  //int n;  int m, nnz;  struct globs_ *gl;  gl=(struct globs_ *)adata;  cnp=gl->cnp; pnp=gl->pnp; mnp=gl->mnp;  Kparms=gl->intrcalib;  camparams=gl->camparams;  //n=idxij->nr;  m=idxij->nc;  for(j=0; j<m; ++j){    /* j-th camera parameters */    pqr=camparams+j*cnp;    pt=pqr+3; // quaternion vector part has 3 elements    nnz=sba_crsm_col_elmidxs(idxij, j, rcidxs, rcsubs); /* find nonzero hx_ij, i=0...n-1 */    for(i=0; i<nnz; ++i){      ppt=p + rcsubs[i]*pnp;      pmeas=hx + idxij->val[rcidxs[i]]*mnp; // set pmeas to point to hx_ij      calcImgProj(Kparms, pqr, pt, ppt, pmeas); // evaluate Q in pmeas    }  }}/* Given a parameter vector p made up of the 3D coordinates of n points, compute in * jac the jacobian of the predicted measurements, i.e. the jacobian of the projections of 3D points in the m images. * The jacobian is returned in the order (B_11, ..., B_1m, ..., B_n1, ..., B_nm), * where B_ij=dx_ij/db_i (see HZ). * Notice that depending on idxij, some of the B_ij might be missing *

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91蝌蚪porny九色| 自拍偷拍欧美激情| 91精品啪在线观看国产60岁| 91在线国产观看| 成人精品小蝌蚪| 成人午夜视频网站| 丰满岳乱妇一区二区三区| 国产精品1区2区3区| 国产精品一区二区免费不卡| 国产精品资源网| 国产精品99久久久| 成人国产精品免费观看动漫| 成人免费视频播放| 99在线精品免费| 色呦呦日韩精品| 欧美视频你懂的| 538在线一区二区精品国产| 91超碰这里只有精品国产| 日韩欧美二区三区| 久久久不卡网国产精品二区| 国产欧美一区二区三区在线老狼| 欧美激情一区二区| 中文字幕在线不卡一区二区三区| 综合久久久久久久| 亚洲高清免费视频| 麻豆精品视频在线观看视频| 国产尤物一区二区在线| 国产成人亚洲综合a∨婷婷图片| 成人性生交大片| 色av一区二区| 4438x成人网最大色成网站| 日韩小视频在线观看专区| 中文字幕中文乱码欧美一区二区 | 99精品视频一区二区| 色综合亚洲欧洲| 欧美巨大另类极品videosbest | 亚洲精品乱码久久久久久久久 | 亚洲视频在线观看三级| 亚洲综合999| 蜜臀国产一区二区三区在线播放 | 精品免费视频.| 日本一区二区免费在线| 亚洲伦在线观看| 日本不卡一二三区黄网| 国产·精品毛片| 欧美色图激情小说| 精品91自产拍在线观看一区| 中文字幕一区二区三区av| 午夜视频一区二区三区| 国产一区二区三区蝌蚪| 一本久久a久久免费精品不卡| 91精品国产91久久久久久最新毛片| 久久久久久久久久看片| 一区二区三区在线视频播放| 麻豆一区二区在线| 91免费观看视频| 精品福利一二区| 亚洲激情图片一区| 九九视频精品免费| 欧美在线观看视频一区二区| 久久日韩粉嫩一区二区三区| 一区二区三区蜜桃| 国产成人综合在线| 在线成人午夜影院| 自拍偷拍欧美激情| 韩国av一区二区| 欧美日韩在线播放一区| 国产精品久久看| 久久草av在线| 国产性做久久久久久| 亚洲黄色免费电影| 国产v综合v亚洲欧| 欧美一二三四在线| 亚洲一区二区精品3399| 9人人澡人人爽人人精品| 久久综合丝袜日本网| 五月天网站亚洲| 91香蕉视频在线| 日本一区二区三区视频视频| 日韩av在线播放中文字幕| 色偷偷成人一区二区三区91| 国产日本一区二区| 精品一区二区日韩| 欧美一区二区视频免费观看| 亚洲精品国产视频| 不卡视频免费播放| 国产午夜精品久久久久久免费视| 日韩国产一区二| 欧美日韩在线播放一区| 亚洲三级免费电影| 成人av先锋影音| 欧美激情在线看| 国产高清不卡一区| 久久这里只精品最新地址| 日本欧美在线观看| 777亚洲妇女| 亚洲成人免费在线| 欧美丝袜丝交足nylons| 亚洲精品免费电影| 色八戒一区二区三区| 亚洲精品欧美激情| 99re热视频这里只精品| 国产精品萝li| www.av亚洲| 成人免费一区二区三区视频| gogo大胆日本视频一区| 国产精品拍天天在线| 国产精品自在在线| 亚洲国产精品v| 成人av网站在线| 综合久久综合久久| 91豆麻精品91久久久久久| 亚洲综合一区在线| 欧美高清视频www夜色资源网| 香蕉乱码成人久久天堂爱免费| 欧美优质美女网站| 天堂一区二区在线| 日韩免费观看高清完整版| 久久99精品一区二区三区三区| 欧美本精品男人aⅴ天堂| 国内精品伊人久久久久av影院 | 久久这里只有精品首页| 国产一区三区三区| 国产情人综合久久777777| 成人av先锋影音| 一区二区在线看| 欧美精品三级日韩久久| 麻豆91精品视频| 国产午夜精品久久久久久久| 99精品黄色片免费大全| 亚洲国产成人91porn| 日韩一区二区电影在线| 国产传媒欧美日韩成人| 亚洲欧美一区二区三区极速播放| 欧美婷婷六月丁香综合色| 热久久久久久久| 国产欧美一区二区三区在线看蜜臀| av色综合久久天堂av综合| 亚洲一级片在线观看| 欧美xxxxxxxxx| av色综合久久天堂av综合| 亚洲.国产.中文慕字在线| 精品国产乱码久久久久久图片 | 国产欧美中文在线| 日本道精品一区二区三区 | www.久久精品| 亚洲第一久久影院| 久久久精品人体av艺术| 色域天天综合网| 麻豆91在线播放| 亚洲少妇30p| 日韩一区二区三区免费看 | 久久精品在线观看| 色婷婷久久99综合精品jk白丝| 日韩专区一卡二卡| 日本一区二区久久| 欧美伦理电影网| 成人一区二区三区在线观看| 亚洲高清不卡在线| 欧美国产精品劲爆| 4438x亚洲最大成人网| 成人av午夜影院| 美女被吸乳得到大胸91| 日韩毛片在线免费观看| 日韩欧美国产不卡| 91麻豆免费看| 国产一区二区三区视频在线播放| 夜夜嗨av一区二区三区| 中文字幕一区免费在线观看| 欧美放荡的少妇| 91视频免费看| 国产露脸91国语对白| 日韩综合在线视频| 亚洲人123区| 久久精品男人天堂av| 在线成人免费观看| 色综合网站在线| 国产mv日韩mv欧美| 免费看欧美女人艹b| 亚洲制服丝袜一区| 国产精品女同互慰在线看| 欧美一级生活片| 欧美日韩一区二区三区在线看 | 欧美成人性战久久| 欧美视频在线一区| 91视频一区二区三区| 高清在线观看日韩| 久久av中文字幕片| 日韩国产精品久久| 亚洲一区二区三区在线看| 国产精品国产三级国产aⅴ中文| 精品久久久久久久久久久久包黑料 | aaa亚洲精品一二三区| 国产一区二区视频在线| 久久国内精品自在自线400部| 亚洲高清免费一级二级三级| 一区二区三区蜜桃| 亚洲精品日韩一| 亚洲日本va午夜在线影院| 国产精品午夜电影|