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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? writefeatures.c

?? KLT: An Implementation of the Kanade-Lucas-Tomasi Feature Tracker KLT: An Implementation of the
?? C
?? 第 1 頁 / 共 2 頁
字號:
  if (KLT_verbose >= 1 && fname != NULL)  {    fprintf(stderr,              "(KLT) Writing feature history to %s file: '%s'\n",             (fmt == NULL ? "binary" : "text"), fname);  }  if (fmt != NULL) {  /* text file or stderr */    fp = _printSetupTxt(fname, fmt, format, &type);    _printHeader(fp, format, FEATURE_HISTORY, fh->nFrames, 0);	    for (i = 0 ; i < fh->nFrames ; i++)  {      fprintf(fp, "%5d | ", i);      _printFeatureTxt(fp, fh->feature[i], format, type);      fprintf(fp, "\n");    }    _printShutdown(fp);  } else {  /* binary file */    fp = _printSetupBin(fname);    fwrite(binheader_fh, sizeof(char), BINHEADERLENGTH, fp);     fwrite(&(fh->nFrames), sizeof(int), 1, fp);    for (i = 0 ; i < fh->nFrames ; i++)  {      _printFeatureBin(fp, fh->feature[i]);    }    fclose(fp);  }}void KLTWriteFeatureTable(  KLT_FeatureTable ft,  char *fname,   char *fmt){  FILE *fp;  char format[100];  char type;  int i, j;  if (KLT_verbose >= 1 && fname != NULL)  {    fprintf(stderr,              "(KLT) Writing feature table to %s file: '%s'\n",             (fmt == NULL ? "binary" : "text"), fname);  }  if (fmt != NULL) {  /* text file or stderr */    fp = _printSetupTxt(fname, fmt, format, &type);    _printHeader(fp, format, FEATURE_TABLE, ft->nFrames, ft->nFeatures);    for (j = 0 ; j < ft->nFeatures ; j++)  {      fprintf(fp, "%7d | ", j);      for (i = 0 ; i < ft->nFrames ; i++)        _printFeatureTxt(fp, ft->feature[j][i], format, type);      fprintf(fp, "\n");    }    _printShutdown(fp);  } else {  /* binary file */    fp = _printSetupBin(fname);    fwrite(binheader_ft, sizeof(char), BINHEADERLENGTH, fp);     fwrite(&(ft->nFrames), sizeof(int), 1, fp);    fwrite(&(ft->nFeatures), sizeof(int), 1, fp);    for (j = 0 ; j < ft->nFeatures ; j++)  {      for (i = 0 ; i < ft->nFrames ; i++)  {        _printFeatureBin(fp, ft->feature[j][i]);      }    }    fclose(fp);  }}static structureType _readHeader(  FILE *fp,  int *nFrames,  int *nFeatures,  KLT_BOOL *binary){#define LINELENGTH 100  char line[LINELENGTH];  structureType id;	  /* If file is binary, then read data and return */  fread(line, sizeof(char), BINHEADERLENGTH, fp);  line[BINHEADERLENGTH] = 0;  if (strcmp(line, binheader_fl) == 0)  {    assert(nFeatures != NULL);    fread(nFeatures, sizeof(int), 1, fp);    *binary = TRUE;    return FEATURE_LIST;  } else if (strcmp(line, binheader_fh) == 0)  {    assert(nFrames != NULL);    fread(nFrames, sizeof(int), 1, fp);    *binary = TRUE;    return FEATURE_HISTORY;  } else if (strcmp(line, binheader_ft) == 0)  {    assert(nFrames != NULL);    assert(nFeatures != NULL);    fread(nFrames, sizeof(int), 1, fp);    fread(nFeatures, sizeof(int), 1, fp);    *binary = TRUE;    return FEATURE_TABLE;    /* If file is NOT binary, then continue.*/  } else {    rewind(fp);    *binary = FALSE;  }  /* Skip comments until warning line */  while (strcmp(line, warning_line) != 0)  {    fgets(line, LINELENGTH, fp);    if (feof(fp))      KLTError("(_readFeatures) File is corrupted -- Couldn't find line:\n"               "\t%s\n", warning_line);  }  /* Read 'Feature List', 'Feature History', or 'Feature Table' */  while (fgetc(fp) != '-');  while (fgetc(fp) != '\n');  fgets(line, LINELENGTH, fp);  if (strcmp(line, "KLT Feature List\n") == 0) id = FEATURE_LIST;  else if (strcmp(line, "KLT Feature History\n") == 0) id = FEATURE_HISTORY;  else if (strcmp(line, "KLT Feature Table\n") == 0) id = FEATURE_TABLE;  else    KLTError("(_readFeatures) File is corrupted -- (Not 'KLT Feature List', "             "'KLT Feature History', or 'KLT Feature Table')");  /* If there's an incompatibility between the type of file */  /* and the parameters passed, exit now before we attempt */  /* to write to non-allocated memory.  Higher routine should */  /* detect and handle this error. */  if ((id == FEATURE_LIST && nFeatures == NULL) ||      (id == FEATURE_HISTORY && nFrames == NULL) ||      (id == FEATURE_TABLE && (nFeatures == NULL || nFrames == NULL)))    return id;  /* Read nFeatures and nFrames */  while (fgetc(fp) != '-');  while (fgetc(fp) != '\n');  fscanf(fp, "%s", line);  if (id == FEATURE_LIST)  {    if (strcmp(line, "nFeatures") != 0)      KLTError("(_readFeatures) File is corrupted -- "               "(Expected 'nFeatures', found '%s' instead)", line);  } else if (strcmp(line, "nFrames") != 0)    KLTError("(_readFeatures) File is corrupted -- "             "(Expected 'nFrames', found '%s' instead)", line);  fscanf(fp, "%s", line);  if (strcmp(line, "=") != 0)    KLTError("(_readFeatures) File is corrupted -- "             "(Expected '=', found '%s' instead)", line);  if (id == FEATURE_LIST) fscanf(fp, "%d", nFeatures);  else fscanf(fp, "%d", nFrames);  /* If 'Feature Table', then also get nFeatures */  if (id == FEATURE_TABLE)  {    fscanf(fp, "%s", line);    if (strcmp(line, ",") != 0)      KLTError("(_readFeatures) File '%s' is corrupted -- "               "(Expected 'comma', found '%s' instead)", line);    fscanf(fp, "%s", line);    if (strcmp(line, "nFeatures") != 0)      KLTError("(_readFeatures) File '%s' is corrupted -- "               "(2 Expected 'nFeatures ', found '%s' instead)", line);    fscanf(fp, "%s", line);    if (strcmp(line, "=") != 0)      KLTError("(_readFeatures) File '%s' is corrupted -- "               "(2 Expected '= ', found '%s' instead)", line);    fscanf(fp, "%d", nFeatures);  }  /* Skip junk before data */  while (fgetc(fp) != '-');  while (fgetc(fp) != '\n');  return id;#undef LINELENGTH}static void _readFeatureTxt(  FILE *fp,  KLT_Feature feat){  while (fgetc(fp) != '(');  fscanf(fp, "%f,%f)=%d", &(feat->x), &(feat->y), &(feat->val));}static void _readFeatureBin(  FILE *fp,  KLT_Feature feat){  fread(&(feat->x), sizeof(KLT_locType), 1, fp);  fread(&(feat->y), sizeof(KLT_locType), 1, fp);  fread(&(feat->val), sizeof(int), 1, fp);}/********************************************************************* * KLTReadFeatureList * KLTReadFeatureHistory * KLTReadFeatureTable * * If the first parameter (fl, fh, or ft) is NULL, then the  * corresponding structure is created. */KLT_FeatureList KLTReadFeatureList(  KLT_FeatureList fl_in,  char *fname){  FILE *fp;  KLT_FeatureList fl;  int nFeatures;  structureType id;  int indx;  KLT_BOOL binary; 		/* whether file is binary or text */  int i;  fp = fopen(fname, "rb");  if (fp == NULL)  KLTError("(KLTReadFeatureList) Can't open file '%s' "                            "for reading", fname);  if (KLT_verbose >= 1)     fprintf(stderr,  "(KLT) Reading feature list from '%s'\n", fname);  id = _readHeader(fp, NULL, &nFeatures, &binary);  if (id != FEATURE_LIST)     KLTError("(KLTReadFeatureList) File '%s' does not contain "             "a FeatureList", fname);  if (fl_in == NULL)  {    fl = KLTCreateFeatureList(nFeatures);    fl->nFeatures = nFeatures;  }  else  {    fl = fl_in;    if (fl->nFeatures != nFeatures)      KLTError("(KLTReadFeatureList) The feature list passed "               "does not contain the same number of features as "               "the feature list in file '%s' ", fname);  }  if (!binary) {  /* text file */    for (i = 0 ; i < fl->nFeatures ; i++)  {      fscanf(fp, "%d |", &indx);      if (indx != i) KLTError("(KLTReadFeatureList) Bad index at i = %d"                              "-- %d", i, indx);      _readFeatureTxt(fp, fl->feature[i]);    }  } else {  /* binary file */    for (i = 0 ; i < fl->nFeatures ; i++)  {      _readFeatureBin(fp, fl->feature[i]);    }  }  fclose(fp);  return fl;}KLT_FeatureHistory KLTReadFeatureHistory(  KLT_FeatureHistory fh_in,  char *fname){  FILE *fp;  KLT_FeatureHistory fh;  int nFrames;  structureType id;  int indx;  KLT_BOOL binary; 		/* whether file is binary or text */  int i;  fp = fopen(fname, "rb");  if (fp == NULL)  KLTError("(KLTReadFeatureHistory) Can't open file '%s' "                            "for reading", fname);  if (KLT_verbose >= 1) fprintf(stderr,  "(KLT) Reading feature history from '%s'\n", fname);  id = _readHeader(fp, &nFrames, NULL, &binary);  if (id != FEATURE_HISTORY) KLTError("(KLTReadFeatureHistory) File '%s' does not contain "                                      "a FeatureHistory", fname);  if (fh_in == NULL)  {    fh = KLTCreateFeatureHistory(nFrames);    fh->nFrames = nFrames;  }  else  {    fh = fh_in;    if (fh->nFrames != nFrames)      KLTError("(KLTReadFeatureHistory) The feature history passed "               "does not contain the same number of frames as "               "the feature history in file '%s' ", fname);  }  if (!binary) {  /* text file */    for (i = 0 ; i < fh->nFrames ; i++)  {      fscanf(fp, "%d |", &indx);      if (indx != i)         KLTError("(KLTReadFeatureHistory) Bad index at i = %d"                 "-- %d", i, indx);      _readFeatureTxt(fp, fh->feature[i]);    }  } else {  /* binary file */    for (i = 0 ; i < fh->nFrames ; i++)  {      _readFeatureBin(fp, fh->feature[i]);    }  }  fclose(fp);  return fh;}KLT_FeatureTable KLTReadFeatureTable(  KLT_FeatureTable ft_in,  char *fname){  FILE *fp;  KLT_FeatureTable ft;  int nFrames;  int nFeatures;  structureType id;  int indx;  KLT_BOOL binary; 		/* whether file is binary or text */  int i, j;  fp = fopen(fname, "rb");  if (fp == NULL)  KLTError("(KLTReadFeatureTable) Can't open file '%s' "                            "for reading", fname);  if (KLT_verbose >= 1) fprintf(stderr,  "(KLT) Reading feature table from '%s'\n", fname);  id = _readHeader(fp, &nFrames, &nFeatures, &binary);  if (id != FEATURE_TABLE) KLTError("(KLTReadFeatureTable) File '%s' does not contain "                                    "a FeatureTable", fname);  if (ft_in == NULL)  {    ft = KLTCreateFeatureTable(nFrames, nFeatures);    ft->nFrames = nFrames;    ft->nFeatures = nFeatures;  }  else  {    ft = ft_in;					    if (ft->nFrames != nFrames || ft->nFeatures != nFeatures)      KLTError("(KLTReadFeatureTable) The feature table passed "               "does not contain the same number of frames and "               "features as the feature table in file '%s' ", fname);  }  if (!binary) {  /* text file */    for (j = 0 ; j < ft->nFeatures ; j++)  {      fscanf(fp, "%d |", &indx);      if (indx != j)         KLTError("(KLTReadFeatureTable) Bad index at j = %d"                 "-- %d", j, indx);      for (i = 0 ; i < ft->nFrames ; i++)        _readFeatureTxt(fp, ft->feature[j][i]);    }  } else {  /* binary file */    for (j = 0 ; j < ft->nFeatures ; j++)  {      for (i = 0 ; i < ft->nFrames ; i++)        _readFeatureBin(fp, ft->feature[j][i]);    }  }  fclose(fp);  return ft;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美国十次了思思久久精品导航| 久久99国内精品| 欧美成人猛片aaaaaaa| 成人美女在线观看| 奇米精品一区二区三区在线观看| 国产精品久久久久久久久免费桃花| 91精品国产乱| 91麻豆6部合集magnet| 国产美女av一区二区三区| 亚洲一区二区中文在线| 欧美极品少妇xxxxⅹ高跟鞋| 欧美男生操女生| 色综合亚洲欧洲| 国产老肥熟一区二区三区| 三级一区在线视频先锋 | youjizz久久| 日本中文字幕一区| 亚洲一区免费观看| 一区在线观看免费| 久久人人爽爽爽人久久久| 67194成人在线观看| 欧洲一区二区三区免费视频| 成人av网站在线观看免费| 国产在线精品一区二区不卡了 | 欧美成人一级视频| 欧美日韩免费在线视频| 91免费观看国产| eeuss鲁一区二区三区| 国产剧情av麻豆香蕉精品| 免费精品视频在线| 奇米影视一区二区三区小说| 亚洲国产成人高清精品| 一区二区三区毛片| 尤物在线观看一区| 亚洲美女免费在线| 亚洲欧美另类综合偷拍| 亚洲日本丝袜连裤袜办公室| 亚洲视频你懂的| |精品福利一区二区三区| 国产精品不卡一区| 国产精品网站在线| 一区在线中文字幕| 亚洲精品乱码久久久久久日本蜜臀| 国产精品午夜在线| 亚洲欧洲av一区二区三区久久| 国产精品私人影院| 亚洲欧洲精品成人久久奇米网| 国产精品久久久久久久久动漫| 国产精品久久久久影院色老大 | 午夜日韩在线观看| 视频一区二区三区中文字幕| 日韩成人一级大片| 国内不卡的二区三区中文字幕| 久久精品久久久精品美女| 精品午夜久久福利影院| 国产成人午夜精品影院观看视频 | 中文字幕av不卡| 亚洲欧洲精品一区二区三区| 亚洲精品视频一区二区| 亚洲综合另类小说| 日韩电影免费在线看| 狠狠色丁香婷综合久久| 成人一级片在线观看| 91视频观看视频| 欧美日韩国产大片| 欧美精品一区二区三区在线播放| 国产香蕉久久精品综合网| 亚洲婷婷综合久久一本伊一区| 亚洲一区二区四区蜜桃| 久久福利资源站| jizz一区二区| 51久久夜色精品国产麻豆| 国产人伦精品一区二区| 亚洲精品免费视频| 理论片日本一区| 国产宾馆实践打屁股91| 欧美午夜精品久久久| 日韩欧美视频在线| 最新欧美精品一区二区三区| 婷婷久久综合九色综合绿巨人| 国产综合久久久久久鬼色| 91亚洲国产成人精品一区二区三| 欧美精品在线一区二区三区| 国产网站一区二区| 亚洲电影激情视频网站| 国产一区二区免费视频| 在线观看91视频| 久久人人爽人人爽| 亚洲成av人片在www色猫咪| 国产精品一区二区视频| 欧美在线免费观看视频| 久久久久国产精品麻豆| 亚洲第一成人在线| 成人sese在线| 日韩亚洲欧美一区二区三区| 1024成人网| 国产精品一区免费视频| 欧美日韩黄色一区二区| 国产精品久久国产精麻豆99网站| 日韩中文字幕不卡| 97久久精品人人爽人人爽蜜臀 | 色哟哟一区二区在线观看| 欧美不卡一区二区三区| 一区二区三区在线视频播放| 国产一区二区三区在线看麻豆| 欧美优质美女网站| 国产精品久久影院| 国产一区二区三区| 91精品视频网| 亚洲成人综合网站| 91在线云播放| 国产精品拍天天在线| 久久97超碰国产精品超碰| 欧美日韩亚州综合| 亚洲免费观看在线观看| 成人免费精品视频| 久久久精品中文字幕麻豆发布| 免费日韩伦理电影| 欧美精品乱码久久久久久按摩| 亚洲免费在线电影| 91麻豆自制传媒国产之光| 中文字幕免费观看一区| 国产一区二区三区av电影| 欧美成人r级一区二区三区| 日韩电影免费一区| 欧美精品日韩一区| 性欧美大战久久久久久久久| 在线观看国产日韩| 一区二区三区成人| 色婷婷av一区二区三区软件| 中文字幕亚洲一区二区av在线 | 欧美一区二区三区日韩视频| 香蕉久久夜色精品国产使用方法| 色综合av在线| 亚洲青青青在线视频| 91网页版在线| 亚洲乱码国产乱码精品精可以看| 99国产欧美久久久精品| 亚洲欧美在线aaa| 色婷婷综合五月| 亚洲一区在线免费观看| 欧洲精品一区二区三区在线观看| 亚洲一区二区三区小说| 欧美日韩在线播放一区| 日韩精品成人一区二区三区 | 91黄色激情网站| 亚洲图片一区二区| 欧美一区二区三区影视| 久久99精品国产麻豆婷婷洗澡| 欧美成va人片在线观看| 国产高清精品久久久久| 中文字幕一区二区三中文字幕| 色综合天天狠狠| 亚洲五码中文字幕| 日韩精品一区二区三区三区免费| 久久国产精品72免费观看| 国产色综合一区| 色综合久久久久久久久| 丝袜美腿亚洲一区| 亚洲精品一区二区三区福利| 成人综合日日夜夜| 又紧又大又爽精品一区二区| 制服视频三区第一页精品| 国产一区二区不卡老阿姨| 国产精品久久久久四虎| 在线观看视频一区二区欧美日韩| 日韩高清不卡一区二区三区| 精品国产一二三| 99久久精品国产一区二区三区 | 天天综合日日夜夜精品| 精品久久国产老人久久综合| 成人动漫av在线| 午夜精品国产更新| 国产三区在线成人av| 色婷婷亚洲综合| 国内不卡的二区三区中文字幕| 亚洲天堂久久久久久久| 日韩欧美电影一区| 99精品国产一区二区三区不卡| 视频一区二区中文字幕| 国产欧美一区二区三区在线老狼| 在线观看av一区二区| 九九在线精品视频| 亚洲理论在线观看| 久久久亚洲精华液精华液精华液| 91小视频免费看| 激情文学综合网| 亚洲主播在线播放| www精品美女久久久tv| 色妹子一区二区| 国产精品一级黄| 日本最新不卡在线| 亚洲老妇xxxxxx| 欧美激情中文字幕一区二区| 欧美肥大bbwbbw高潮| 97久久超碰国产精品电影| 黄色日韩三级电影| 天天色天天爱天天射综合| 国产精品久久久久久一区二区三区| 欧美一区永久视频免费观看|