⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 descriptor.c

📁 FERET人脸库的处理代码。内函预处理
💻 C
字号:
/*----------------------------------------------------------------------PROGRAM: descriptor.cDATE:    6/2/94AUTHOR:  Baback Moghaddam, baback@media.mit.edu------------------------------------------------------------------------   This program reads a descriptor file from indir and prints out   its contents. It's meant as a diagnostic routine.---------------------------------------------------------------------- */#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 "filter.h"/* ----------- Command-Line Parsing Stuff ------- */extern int optind;extern char *optarg;char *progname;          /* used to store the name of the program  */char comline[256];       /* used to store the entire command line  */#define OPTIONS "i:"char *usage = "-i indir\n";#define MAX_CHARS  256/*----------------------------------------------------------------------*/main(int argc, char **argv){   register int i,j,k,l,ii,jj;  int f, c, nframe, sets, bytes_pixel;  int nrow, ncol, out_nrow, out_ncol, M, N;  char command[MAX_CHARS],indir[MAX_CHARS],listfile[MAX_CHARS], \    infile[MAX_CHARS], outdir[MAX_CHARS], \      filename[MAX_CHARS], line[MAX_CHARS];  /* required input flags */    int err_flag   = 0;  int in_flag    = 0;  progname = argv[0];  for (i=0; i<argc; i++)    strcat(comline, argv[i]),strcat(comline, " ");      /* ----------------------  Command Line Parse ------------------------ */    while ((c = getopt(argc, argv, OPTIONS)) != EOF)    switch (c) {          case 'i':      strcpy(indir, optarg);      in_flag = 1;      break;    case '?':      err_flag = 1;      break;    }    /* command line error check */    if (err_flag || !in_flag) {    fprintf(stderr,"\nUSAGE: %s %s\n\n", progname, usage);    exit(1);  }  /* ----  read indir descriptor -------- */    read_descriptor(indir, &nframe, &sets, &bytes_pixel, &ncol, &nrow);    printf("\n");  printf("data_files  = %d\n", nframe);  printf("data_sets   = %d\n", sets);  printf("dimensions  = %d %d\n", nrow, ncol);  printf("bytes_pixel = %d\n", bytes_pixel);  printf("\n");  return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -