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

📄 example5.c

📁 this is code for finding and tracking feature points
💻 C
字号:
/**********************************************************************Demonstrates manually tweaking the tracking context parameters.**********************************************************************/#include "pnmio.h"#include "klt.h"#ifdef WIN32
int RunExample5()
#else
int main()
#endif
{  unsigned char *img1, *img2;  KLT_TrackingContext tc;  KLT_FeatureList fl;  int nFeatures = 100;  int ncols, nrows;  tc = KLTCreateTrackingContext();  tc->mindist = 20;  tc->window_width  = 9;  tc->window_height = 9;  KLTChangeTCPyramid(tc, 15);  KLTUpdateTCBorder(tc);  fl = KLTCreateFeatureList(nFeatures);  img1 = pgmReadFile("img0.pgm", NULL, &ncols, &nrows);  img2 = pgmReadFile("img2.pgm", NULL, &ncols, &nrows);  KLTSelectGoodFeatures(tc, img1, ncols, nrows, fl);  KLTWriteFeatureListToPPM(fl, img1, ncols, nrows, "feat1b.ppm");  KLTTrackFeatures(tc, img1, img2, ncols, nrows, fl);  KLTWriteFeatureListToPPM(fl, img2, ncols, nrows, "feat2b.ppm");
  return 0;
}

⌨️ 快捷键说明

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