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

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

?? ms_eigsearch.c

?? feret人臉圖象數(shù)據(jù)庫處理代碼
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/*----------------------------------------------------------------------PROGRAM: ms_eigsearch3.cDATE:    10/14/93AUTHOR:  Baback Moghaddam, baback@media.mit.edu------------------------------------------------------------------------  Multiple-Scale Local feature search by eigentemplates  This routine looks for 2 (3) BF files in the datapath (defined below):  1. features.bf  which is an N-by-2 matrix defining the size (row,col)     of each of the N templates.  2. template[n].bf  where n=1...N is the eigenvector ROW matrix where     the 1st row is the mean feature, and the remaining rows     are the principal eigenvectors 1:M.      NOTE: The eigenvectors are stored in column-order (as in MATLAB)  3. variances.bf which is an N-by-M matrix, where each row represents     the rank-ordered eigenvalues associated with that feature     NOTE: The set of scales over which the search is to be performed           is provided in an ASCII file of the format:	   s1	   s2	   .	   .	   .	   sN----------------------------------------------------------------------   NOTE: In this version if unitmap'ing is selected it will use         the Mahalanobis mean/stddev in addition to the standard	 distance computation.------------------------------------------------------------------------     Configure this code using the following defines:          DO_VAR:     will set each pixel whose surrond's variance                 is < VAR_THRESHOLD to VAR_MAXVALUE----------------------------------------------------------------------   NOTE: Fixed the umap_musigma_score problem	       ---------------------------------------------------------------------- */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <float.h>#include "util.h"#include "io.h"#include "matrix.h"#include "affine.h"/* ----------- CONFIGURES ---------------- */#define DO_VAR                  0     /*  variance check     */#define VAR_THRESHOLD           100   /*  threshold for low-var patches */#define VAR_MAXVALUE            1e7   /*  replacement in distance map   */#define MAX_NUM_TEMPLATES       5#define MAX_NUM_SCALES          32#define MAX_NUM_EIGENVECTORS    128   /* for static storage in dffs() */#define MAX_VECTOR_LENGTH       128    /* for static storage in mahalanobis_distance() */#define MAX_CHARS               512/* ----------- Command-Line Parsing Stuff ------- */extern int optind;extern char *optarg;char *progname;          /* used to store the name of the program  */char comline[170];       /* used to store the entire command line  */#define OPTIONS "i:l:o:d:n:p:a:b:k:s:mguec"char *usage = "\t-i indir -l list -s scalefile [-d datadir]\n\\t\t\t[-o outfile] [-a first_ev] [-b last_ev] [-k feature]\n\\t\t\t[-g] [-u] [-m] [-e] [-c]\n";char *help = "\Multiscale Eigentemplate Search\n\n\-i indir   \t input directory\n\-l listfile\t ASCII file listing indir files to process (one per line)\n\-s scalefile\t ASCII file of scales\n\-d datadir \t data dir holding eigentemplate BF files (default = ./)\n\-o outfile \t output file (default = ./ms_eigsearch.out)\n\-a first_ev\t first eigenvector (default = 1)\n\-b last_ev \t last eigenvector  (default = 5)\n\-k feature \t search for the k-th feature only\n\-g         \t pre-process with graymap\n\-u         \t pre-process with unitmap\n\-m         \t use Mahalanobis distance instead of DFFS\n\-c         \t use spatial priors\n\-e         \t output detection maps (in indir/Maps)\n";/* --------- Function Prototypes ---------- */float dffs(float *patch, int N, float **eigvectors, int first, int last);float mahalanobis(float *patch, int N, float **eigvectors, float *eigvalues,		  int first, int last);float graymap(float *patch, int N);float unitmap(float *patch, int N);void statistics(float *p, int N, float *mean, float *sigma);float umap_musigma_distance(float mean, float sigma, float **umap_musigma);float mahalanobis_distance(float *x, int N, float *Mu, float **inv_Sigma);/* -------- Globals ---------------- */float **template[MAX_NUM_TEMPLATES];float **errormap[MAX_NUM_TEMPLATES];float **variances;float **umap_musigma[MAX_NUM_TEMPLATES];float **spatial_musigma[MAX_NUM_TEMPLATES];/* ------- Command Line Defaults ------------- */int do_dmdumps = 0; /* default is NOT to do errormap dumps  */int do_graymap = 0; /* default is NOT to graymap each patch */int do_unitmap = 0; /* default is NOT to unitmap each patch */int do_mahalanobis = 0; /* default is NOT to do this computation */int do_spatial = 0; /* default is NOT to add [x,y] Mahalanobis dist */int eig_first = 1;  /* search using first 5 eigenvectors by default */int eig_last  = 5;/*----------------------------------------------------------------------*//* ---------------------------- MAIN ---------------------------------- */main(int argc, char *argv[]){  register int i,j,k,l,ii,jj;  int f,s,c,feature=1,nframe,nfeatures,sets, bytes_pixel;  int nrow, ncol, max_N, xc, yc;  char command[MAX_CHARS],indir[MAX_CHARS],infile[MAX_CHARS];  char listfile[MAX_CHARS], scalefile[MAX_CHARS], line[MAX_CHARS];  char datapath[MAX_CHARS],outdir[MAX_CHARS],filename[MAX_CHARS];  char outfile[MAX_CHARS];  float **image, **image_orig;  float fval1, fval2, fval, mean, sigma;  float maxerror;  FILE *fp, *fp2;         /* for output values dump */  int rowl[MAX_NUM_TEMPLATES],rowr[MAX_NUM_TEMPLATES];  int coll[MAX_NUM_TEMPLATES],colr[MAX_NUM_TEMPLATES];  int imin[MAX_NUM_TEMPLATES],imax[MAX_NUM_TEMPLATES];  int jmin[MAX_NUM_TEMPLATES],jmax[MAX_NUM_TEMPLATES];  int N_dim[MAX_NUM_TEMPLATES]; /* the dimensionality of each template */  int M_dim[MAX_NUM_TEMPLATES]; /* the # of eigenvectors for each template */  int numscales;  float scales[MAX_NUM_SCALES];  int rowm[MAX_NUM_SCALES][MAX_NUM_TEMPLATES];  int colm[MAX_NUM_SCALES][MAX_NUM_TEMPLATES];  float error[MAX_NUM_SCALES][MAX_NUM_TEMPLATES];  float **Warp;  float *my_vector;  int xdim, ydim;  int   best_scale[MAX_NUM_TEMPLATES];  float best_error[MAX_NUM_TEMPLATES];  int   best_rowm[MAX_NUM_TEMPLATES];  int   best_colm[MAX_NUM_TEMPLATES];    int **templatesize;  float *patch;  /* required input flags */    int errflag   = 0;  int inflag    = 0;  int scaleflag = 0;  int listflag  = 0;    /* command line defaults */  int singlefeature = 0;    int firstframe = 0;  int lastframe  = 0;  strcpy(datapath,".");               /* default datapath directory to cwd   */  /* setup program name and command line strings */    progname = argv[0];  for (i=0; i<argc; i++)    strcat(comline, argv[i]),strcat(comline, " ");  /* set up default outfile name */  sprintf(outfile,"%s.out",progname); /* default output file is progname.out */    /* ----------------------  Command Line Parse ------------------------ */    while ((c = getopt(argc, argv, OPTIONS)) != EOF)    switch (c) {          case 'i':      strcpy(indir, optarg);      inflag = 1;      break;          case 'l':      strcpy(listfile, optarg);      listflag = 1;      break;    case 'd':      strcpy(datapath, optarg);      break;    case 's':      strcpy(scalefile, optarg);      scaleflag = 1;      break;    case 'k':      feature = atoi(optarg);      singlefeature = 1;      break;    case 'o':      strcpy(outfile, optarg);      break;    case 'a':      eig_first  = atoi(optarg);      break;    case 'b':      eig_last = atoi(optarg);      break;    case 'g':      do_graymap = 1;      break;    case 'u':      do_unitmap = 1;      break;    case 'e':      do_dmdumps = 1;      break;    case 'm':      do_mahalanobis = 1;      break;    case 'c':      do_spatial = 1;      break;    case '?':      errflag = 1;      break;          }      /* command line error check */    if (errflag || !inflag || !scaleflag || !listflag) {    fprintf(stderr,"\nUSAGE: %s %s\n%s\n", progname, usage, help);    exit(1);  }  sprintf(outdir,"%s/Maps",indir);   /* default output dir is indir/Maps    */  /* -------- Load eigentemplate data --------------- */  sprintf(filename,"%s/features.bf",datapath);   {     float **m;    max_N = 0;    m = read_BIN(filename, &nfeatures, &ncol);    templatesize = imatrix(1, nfeatures, 1, 2);        for (i=1; i<=nfeatures; i++) {      for (j=1; j<=ncol; j++)	templatesize[i][j] = (int) m[i][j];      N_dim[i] = templatesize[i][1]*templatesize[i][2];      if (N_dim[i]>max_N) 	max_N = N_dim[i];      free_matrix(m, 1, nfeatures, 1, ncol);    }  }    for (i=1; i<=nfeatures; i++) {    sprintf(filename,"%s/template%d.bf",datapath,i);    template[i] = read_BIN(filename, &nrow, &ncol);    M_dim[i] = nrow;    if (ncol!=N_dim[i])      myerror("Template sizes in BF don't match those is definition file");  }  if (do_mahalanobis) {    sprintf(filename,"%s/variances.bf",datapath);    variances = read_BIN(filename, &nrow, &ncol);    if (nrow!=nfeatures) {      fprintf(stderr,	      "ERROR: variances.bf has %d rows! (must have %d)\n\n",	      nrow, nfeatures);      exit(1);    }    if (eig_last>ncol) {      fprintf(stderr,	      "ERROR: variances.bf has %d cols! (must have atleast %d)\n\n",	      ncol, eig_last);      exit(1);    }  }      if (do_unitmap) {    float **C, **invC;    int m, n;    C = matrix(1,2,1,2);    invC = matrix(1,2,1,2);    for (k=1; k<=nfeatures; k++) {      sprintf(filename,"%s/umap_musigma%d.bf",datapath,k);      umap_musigma[k] = read_BIN(filename, &m, &n );           /* invert the covariance matrix portion of umap_musigma[k] */      for (i=1; i<=2; i++)	for (j=1; j<=2; j++)	  C[i][j] = umap_musigma[k][i+1][j];      matrix_inverse(C, 2, invC);      for (i=1; i<=2; i++)	for (j=1; j<=2; j++)	  umap_musigma[k][i+1][j] = invC[i][j];      /* ----------- DEBUG -----------      for (i=1; i<=3; i++) {	for (j=1; j<=2; j++)	  printf("%f ",umap_musigma[k][i][j]);	printf("\n");      }      printf("\n\n");      C[1][1] = 10;      C[1][2] = 10;      printf("dist = %f \n", 	     mahalanobis_distance(C[1], 2, umap_musigma[k][1], &umap_musigma[k][1]));      printf("dist = %f \n",		    umap_musigma_distance(10, 10, umap_musigma[k]));      exit(1);      --------------- DEBUG ------------- */    }      free_matrix(C,1,2,1,2);    free_matrix(invC,1,2,1,2);  }     if (do_spatial) {    float **C, **invC;    int m, n;    C = matrix(1,2,1,2);    invC = matrix(1,2,1,2);    for (k=1; k<=nfeatures; k++) {      sprintf(filename,"%s/spatial_musigma%d.bf",datapath,k);      spatial_musigma[k] = read_BIN(filename, &m, &n );           /* invert the covariance matrix portion of umap_musigma[k] */      for (i=1; i<=2; i++)	for (j=1; j<=2; j++)	  C[i][j] = spatial_musigma[k][i+1][j];      matrix_inverse(C, 2, invC);      for (i=1; i<=2; i++)	for (j=1; j<=2; j++)	  spatial_musigma[k][i+1][j] = invC[i][j];      /* ----------- DEBUG -----------      for (i=1; i<=3; i++) {	for (j=1; j<=2; j++)	  printf("%f ",spatial_musigma[k][i][j]);	printf("\n");      }      printf("\n\n");      C[1][1] = 10;      C[1][2] = 10;      printf("dist = %f \n", 	     mahalanobis_distance(C[1], 2, spatial_musigma[k][1], &spatial_musigma[k][1]));      printf("dist = %f \n",		    spatial_musigma_distance(10, 10, spatial_musigma[k]));      exit(1);      --------------- DEBUG ------------- */    }      free_matrix(C,1,2,1,2);    free_matrix(invC,1,2,1,2);  }  /* ---- determine left/right boundaries for errormaps ----- */  for (i=1; i<=nfeatures; i++) {    rowl[i] = (int) templatesize[i][1]/2.0;    rowr[i] = templatesize[i][1] - rowl[i] - 1;    coll[i] = (int) templatesize[i][2]/2.0;    colr[i] = templatesize[i][2] - coll[i] - 1;  }  patch = vector(1, max_N);  my_vector = vector(1, MAX_VECTOR_LENGTH);  /* ----  read indir descriptor -------- */    read_descriptor(indir, &nframe, &sets, &bytes_pixel, &ncol, &nrow);  if (sets>1)     myerror("Input files must be single-set DAT files!");  image = matrix(1, nrow, 1, ncol);  image_orig = matrix(1, nrow, 1, ncol);  /* --- allocate errormap tensor and set window boundaries --- */  for (k=feature; k<=(singlefeature>0 ? feature:nfeatures); k++) {    errormap[k] = matrix(1, nrow, 1, ncol);    imin[k] = rowl[k] + 1;    imax[k] = nrow - rowr[k];    jmin[k] = coll[k] + 1;    jmax[k] = ncol - colr[k];  }    /* -------- Load scalefile -------------- */  sprintf(filename,"%s",scalefile);  if ((fp = fopen(filename, "r")) == NULL) {    fprintf(stderr,"ERROR Could not open scale file %s \n\n", filename);    exit(1);  }  i = 1;  while (fgets(line, MAX_CHARS, fp)) {    if (strncmp(line, "#", 1) != 0 && strlen(line)>1) {      sscanf(line, "%f", scales+i);      i++;    }  }  numscales = i-1;  fclose(fp);  Warp = matrix(1, 3, 1, 3);  /* ----  open output data file ---- */  sprintf(filename,"%s", outfile);  if ((fp2 = fopen(filename, "w")) == NULL) {    fprintf(stderr,"ERROR Could not open output file %s \n\n", filename);    exit(1);  }    

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲资源中文字幕| 久久综合久色欧美综合狠狠| 亚洲国产成人91porn| 色久综合一二码| 一区二区三区毛片| 欧美欧美午夜aⅴ在线观看| 麻豆国产91在线播放| 国产欧美日韩精品在线| 91免费视频网| 日韩激情中文字幕| 久久久久高清精品| 91福利小视频| 久久99久久久久| 国产欧美日韩精品一区| 色素色在线综合| 日韩影视精彩在线| 国产日韩欧美麻豆| 欧美伊人久久大香线蕉综合69| 视频一区视频二区中文| 久久亚洲综合色一区二区三区| 成人app在线观看| 午夜精品成人在线视频| 国产色婷婷亚洲99精品小说| 日本精品视频一区二区三区| 免费欧美在线视频| **网站欧美大片在线观看| 在线成人av网站| 99久久精品国产精品久久| 日本不卡一二三区黄网| 国产精品久久久久久久久久久免费看 | 国产毛片精品一区| 亚洲欧美日本韩国| 欧美一级精品在线| 色综合天天综合网天天狠天天| 青青草国产成人av片免费| 国产精品免费av| 日韩欧美一区中文| 日本电影欧美片| 国产精品91一区二区| 亚洲成人综合网站| 中文字幕永久在线不卡| 精品久久久久久久久久久久包黑料 | 国产精品一区二区三区四区| 亚洲国产sm捆绑调教视频| 欧美高清在线视频| 精品国内片67194| 欧美日韩一区二区三区视频| 99在线热播精品免费| 老司机精品视频导航| 午夜精品福利久久久| 亚洲精品国产a| 一区二区三区在线免费播放 | 成人久久视频在线观看| 黄网站免费久久| 偷拍自拍另类欧美| 一区二区三区加勒比av| 国产精品黄色在线观看| 久久色视频免费观看| 欧美一区二区大片| 欧美伦理电影网| 欧美日韩午夜在线视频| 色婷婷精品久久二区二区蜜臀av | 黄页视频在线91| 日本欧美一区二区三区乱码| 亚洲高清免费在线| 亚洲国产精品一区二区www在线| 国产精品福利一区二区| 国产精品嫩草影院com| 亚洲国产激情av| 国产精品视频一二三| 国产精品日韩成人| 欧美国产一区二区| 国产精品免费av| 亚洲视频香蕉人妖| 亚洲欧美日韩在线不卡| 日韩毛片视频在线看| 中文字幕亚洲精品在线观看| 中文字幕一区二区三区av| 最新热久久免费视频| ...中文天堂在线一区| 亚洲久本草在线中文字幕| 亚洲精品日日夜夜| 婷婷开心久久网| 日韩福利视频网| 精品一区二区三区免费| 国产精品一区二区三区乱码| 丁香激情综合五月| 一本一道综合狠狠老| 欧美性色欧美a在线播放| 欧美精品在线观看播放| 日韩精品一区二区三区中文精品| 日韩精品一区在线| 国产调教视频一区| 亚洲精品水蜜桃| 日韩电影在线一区| 国产精品88888| 一本色道久久综合狠狠躁的推荐 | 久久综合精品国产一区二区三区 | 最新欧美精品一区二区三区| 亚洲一区二区中文在线| 天堂一区二区在线| 国产一区二区三区精品视频| 不卡一区二区三区四区| 欧美亚洲自拍偷拍| 91麻豆精品91久久久久久清纯 | 久久99精品久久久久| 成人黄色国产精品网站大全在线免费观看 | 亚洲美女一区二区三区| 亚洲二区在线视频| 激情成人综合网| 91美女在线看| 欧美一区二区三区人| 国产午夜精品美女毛片视频| 亚洲免费在线电影| 国产在线精品一区二区不卡了 | 亚洲国产欧美在线人成| 久久99久久精品| 91视频一区二区| 日韩一卡二卡三卡国产欧美| 欧美国产日韩在线观看| 亚洲成人免费电影| 国产精品18久久久久久vr| 在线亚洲精品福利网址导航| 欧美不卡一区二区三区四区| 中文字幕中文乱码欧美一区二区| 日日夜夜精品视频天天综合网| 丰满亚洲少妇av| 日韩免费成人网| 一区二区三区久久久| 色综合久久综合网97色综合| 综合网在线视频| 另类小说一区二区三区| 国产成人激情av| 欧美日韩国产小视频在线观看| 欧美大白屁股肥臀xxxxxx| 中文字幕一区二区三区av| 麻豆高清免费国产一区| 欧美性videosxxxxx| 日本不卡一区二区| 日韩中文字幕不卡| 91精品国产91久久综合桃花| 国产精品女同互慰在线看| 毛片av一区二区| 欧美视频一区在线| 亚洲人成网站精品片在线观看| 国产剧情一区二区三区| 欧美日韩精品一区二区三区蜜桃| 国产精品短视频| 成人三级伦理片| 国产性天天综合网| 另类成人小视频在线| 91精品国产麻豆| 舔着乳尖日韩一区| 欧美中文字幕一二三区视频| 亚洲日本va午夜在线电影| jlzzjlzz亚洲日本少妇| 国产精品久久久久久久第一福利 | 粉嫩av一区二区三区| 久久久天堂av| 国产精品1024| 欧美激情在线一区二区| 国内一区二区在线| wwww国产精品欧美| 国产精品一区二区果冻传媒| 久久久综合视频| 国产麻豆精品在线观看| 国产香蕉久久精品综合网| 国产一区不卡在线| 国产亚洲污的网站| 国产成人丝袜美腿| 国产精品毛片无遮挡高清| 岛国精品一区二区| 亚洲国产精品ⅴa在线观看| 成人av资源在线观看| 中文字幕在线一区免费| 色吧成人激情小说| 亚洲免费资源在线播放| 91极品视觉盛宴| 日本美女一区二区三区| 精品播放一区二区| 成人av网在线| 亚洲综合在线五月| 欧美一区二区三区思思人| 国精产品一区一区三区mba桃花| 欧美激情在线一区二区| 一本久久a久久精品亚洲| 午夜精品久久久| 久久亚洲二区三区| 91视频免费观看| 舔着乳尖日韩一区| 国产日韩亚洲欧美综合| 日本丰满少妇一区二区三区| 婷婷夜色潮精品综合在线| 2023国产精华国产精品| 99久久久精品| 免费成人深夜小野草| 中文字幕av一区二区三区高| 欧美特级限制片免费在线观看| 蜜臀av性久久久久蜜臀av麻豆| 国产婷婷色一区二区三区在线|