资源简介
功能全面的粒子滤波视频跟踪程序,本人基于粒子滤波原始程序开发而成,开发环境为VS2010+OPENCV2.2,运行需要OPENCV2以上及GSL1.8支持,程序支持手动选框,暂停与继续,结果输出等功能,资源中的Word文档中有每个文件及函数的详细说明,非常适合初学者。
代码片段和文件信息
// Getopt.c
// 命令行解析函数的实现
#include “getopt.h“
static const char* ID = “$Id: getopt.cv 1.2 2003/10/26 03:10:20 vindaci Exp $“;
char* optarg = NULL;
int optind = 0;
int opterr = 1;
int optopt = ‘?‘;
static char** prev_argv = NULL; /* Keep a copy of argv and argc to */
static int prev_argc = 0; /* tell if getopt params change */
static int argv_index = 0; /* Option we‘re checking */
static int argv_index2 = 0; /* Option argument we‘re checking */
static int opt_offset = 0; /* Index into compounded “-option“ */
static int dashdash = 0; /* True if “--“ option reached */
static int nonopt = 0; /* How many nonopts we‘ve found */
static void increment_index()
{
/* Move onto the next option */
if(argv_index < argv_index2)
{
while(prev_argv[++argv_index] && prev_argv[argv_index][0] != ‘-‘
&& argv_index < argv_index2+1);
}
else
argv_index++;
opt_offset = 1;
}
/* Permutes argv[] so that the argument currently being processed is moved to the end. */
static int permute_argv_once()
{
/* Movability check */
if(argv_index + nonopt >= prev_argc)
return 1;
/* Move the current option to the end bring the others to front */
else
{
char* tmp = prev_argv[argv_index];
/* Move the data */
memmove(&prev_argv[argv_index] &prev_argv[argv_index+1]
sizeof(char**) * (prev_argc - argv_index - 1));
prev_argv[prev_argc - 1] = tmp;
nonopt++;
return 0;
}
}
/*
optstr说明:
1.单个字符,表示选项;
2.单个字符后接一个冒号:表示该选项后必须跟一个参数,
参数紧跟在选项后或者以空格隔开,该参数的指针赋给optarg;
3.单个字符后跟两个冒号,表示该选项后必须跟一个参数,
参数必须紧跟在选项后不能以空格隔开,该参数的指针赋给optarg。
*/
int getopt(int argc char** argv char* optstr)
{
int c = 0;
/* If we have new argv reinitialize */
if(prev_argv != argv || prev_argc != argc)
{
/* Initialize variables */
prev_argv = argv;
prev_argc = argc;
argv_index = 1;
argv_index2 = 1;
opt_offset = 1;
dashdash = 0;
nonopt = 0;
}
/* Jump point in case we want to ignore the current argv_index */
getopt_top:
/* Misc. initializations */
optarg = NULL;
/* Dash-dash check */
if(argv[argv_index] && !strcmp(argv[argv_index] “--“))
{
dashdash = 1;
increment_index();
}
/* If we‘re at the end of argv that‘s it. */
if(argv[argv_index] == NULL)
{
c = -1;
}
/* Are we looking at a string? Single dash is also a string */
else if(dashdash || argv[argv_index][0] != ‘-‘ || !strcmp(argv[argv_index] “-“))
{
/* If we want a string... */
if(optstr[0] == ‘-‘)
{
c = 1;
optarg = argv[argv_index];
increment_index();
}
/* If we really don‘t want it (we‘re in POSIX mode) we‘re done */
else if(optstr[0] == ‘+‘ || getenv(“POSIXLY_CORRECT“))
{
c = -1;
/* Everything else is a non-opt argument */
nonopt = argc - argv_index;
}
/* If we mildly don‘t want it then move it back */
else
{
if(!permute_argv_once()) goto
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-04-15 17:39 SingleObTrkPF\
目录 0 2015-04-15 17:38 SingleObTrkPF\Debug\
文件 76404 2014-12-13 17:38 SingleObTrkPF\Debug\CL.read.1.tlog
文件 2912 2014-12-13 17:38 SingleObTrkPF\Debug\CL.write.1.tlog
文件 11165 2014-12-13 17:38 SingleObTrkPF\Debug\Getopt.obj
文件 38718 2014-12-13 17:38 SingleObTrkPF\Debug\Observation.obj
文件 34859 2014-12-13 17:38 SingleObTrkPF\Debug\Particles.obj
文件 46923 2014-12-13 17:38 SingleObTrkPF\Debug\SOTPF.obj
文件 2578 2013-04-26 16:47 SingleObTrkPF\Debug\SingleObTrkPF.Build.CppClean.log
文件 81 2013-04-26 17:11 SingleObTrkPF\Debug\SingleObTrkPF.lastbuildstate
文件 41117 2014-12-13 17:38 SingleObTrkPF\Debug\SingleObTrkPF.log
文件 2727 2014-12-13 17:38 SingleObTrkPF\Debug\SingleObTrkPFMod.Build.CppClean.log
文件 108544 2015-03-17 15:19 SingleObTrkPF\Debug\SingleObTrkPFMod.exe
文件 406 2014-12-13 17:38 SingleObTrkPF\Debug\SingleObTrkPFMod.exe.em
文件 472 2014-12-13 17:38 SingleObTrkPF\Debug\SingleObTrkPFMod.exe.em
文件 381 2014-12-13 17:38 SingleObTrkPF\Debug\SingleObTrkPFMod.exe.intermediate.manifest
文件 606824 2014-12-13 17:38 SingleObTrkPF\Debug\SingleObTrkPFMod.ilk
文件 85 2014-12-13 17:38 SingleObTrkPF\Debug\SingleObTrkPFMod.lastbuildstate
文件 756736 2014-12-13 17:38 SingleObTrkPF\Debug\SingleObTrkPFMod.pdb
文件 222 2014-12-13 17:38 SingleObTrkPF\Debug\SingleObTrkPFMod_manifest.rc
文件 71274 2014-12-13 17:38 SingleObTrkPF\Debug\Utils.obj
文件 3296 2014-12-13 17:38 SingleObTrkPF\Debug\cl.command.1.tlog
目录 0 2015-04-15 17:39 SingleObTrkPF\Debug\export\
文件 1814315 2006-07-07 22:08 SingleObTrkPF\Debug\libgsl.dll
文件 230190 2006-07-07 22:08 SingleObTrkPF\Debug\libgslcblas.dll
文件 2 2014-12-13 17:38 SingleObTrkPF\Debug\li
文件 2 2014-12-13 17:38 SingleObTrkPF\Debug\li
文件 2 2014-12-13 17:38 SingleObTrkPF\Debug\li
文件 2 2014-12-13 17:38 SingleObTrkPF\Debug\li
文件 2 2014-12-13 17:38 SingleObTrkPF\Debug\li
文件 2 2014-12-13 17:38 SingleObTrkPF\Debug\li
............此处省略32个文件信息
相关资源
- SetupFactory9.5汉化中文版
- 二维Kalman滤波
- KnapsackProblems ByHansKellererUlrichPferschyD
- RT-MDNet视频目标跟踪论文官方预训练网
- PFC3D3.1英文帮助文档
- pfc2d软件说明文档
- 华为路由器vlan ospf rip static 单臂 多臂
- BPF Performance Tools - Brendan Gregg.rar
- PFC3D v3.0 用户手册
- OSPF协议完全实现
- gcc6.2.0以及对应的gmp 、mpfr、mpc
- 基于ViBe+Kalman的目标跟踪
- deepFM实现基于TensorFlow
- SetupFactory9.0.3.0Trial完美汉化破解版附
- MicrostripFiltersforRFMicrowaveApplications第二
- wenquanyi qpf字体[120-360]
- 卡尔曼 ,扩展卡尔曼,无迹卡尔曼,
- 秦永元_卡尔曼滤波与组合导航原理
- PFC5.0相关代码初学者必备
- 基于SIFT的目标跟踪源码
- 多目标实时跟踪程序
- pfc2d3.10手册完整版带部分目录
- iFrpfile all in one tool V1.0.2.zip 20200924版
- 打包工具SetupFactory7.0.1破解汉化版含教
- 多目标跟踪vs+opencv
- 粒子滤波算法及其应用
- 粒子滤波算法及其应用--朱志宇
- 已配准国界、省界、市界、县界shp,
- Probability and Computing by Mitzenmacher and
- 微网逆变器及电能质量治理综合装置
评论
共有 条评论