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

📄 example4.c

📁 KLT: An Implementation of the Kanade-Lucas-Tomasi Feature Tracker KLT: An Implementation of the
💻 C
字号:
/**********************************************************************Reads the feature table from "features.txt", copies the features from the second frame to those of the third frame, writes the features to "feat2.txt", and writes the new feature table to "ft2.txt".  Then theeighth feature is overwritten with the fifth feature, and the resultingtable is saved to "ft3.txt".**********************************************************************/#include <stdio.h>#include "klt.h"#ifdef WIN32
int RunExample4()
#else
int main()
#endif
{  KLT_FeatureList fl;  KLT_FeatureHistory fh;  KLT_FeatureTable ft;  int i;  ft = KLTReadFeatureTable(NULL, "features.txt");  fl = KLTCreateFeatureList(ft->nFeatures);  KLTExtractFeatureList(fl, ft, 1);  KLTWriteFeatureList(fl, "feat1.txt", "%3d");  KLTReadFeatureList(fl, "feat1.txt");  KLTStoreFeatureList(fl, ft, 2);  KLTWriteFeatureTable(ft, "ft2.txt", "%3d");  fh = KLTCreateFeatureHistory(ft->nFrames);  KLTExtractFeatureHistory(fh, ft, 5);  printf("The feature history of feature number 5:\n\n");  for (i = 0 ; i < fh->nFrames ; i++)    printf("%d: (%5.1f,%5.1f) = %d\n",           i, fh->feature[i]->x, fh->feature[i]->y,           fh->feature[i]->val);  KLTStoreFeatureHistory(fh, ft, 8);  KLTWriteFeatureTable(ft, "ft3.txt", "%6.1f");
  return 0;
}

⌨️ 快捷键说明

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