Blobtrack 运行

例程的命令行参数传递规则:
blobtrack.exe [fg=<fg_name>] [bd=<bd_name>]
          [bt=<bt_name>] [btpp=<btpp_name>]
          [bt_corr=<bt_corr_way>]
          [trackgen=<btgen_name>]
          [track=<track_file_name>]
          [scale=<scale val>]
          [noise=<noise_name>] [IVar=<IVar_name>]
          [res=<res_file_name>] [FGTrainFrames=<FGTrainFrames>]
          <yml_file video1 video2 video3>|<avi_file>
blobtrack的各模块CvFGDetector,CvBlobDetector,CvBlobTracker,CvBlobTrackGen,CvBlobTrackPostProc,CvBlobTrackAnalysis中有许多内部参数可以初始化(否则将用缺省值)。通过命令行参数初始化这些模块的参数的格式分别为:

    [fg:<参数名1>=<参数值1>] [fg:<参数名2>=<参数值2>]
    [bd:<参数名1>=<参数值1>] [bd:<参数名2>=<参数值2>]
    [bt:<参数名1>=<参数值1>] [bt:<参数名2>=<参数值2>]
    [btgen:<参数名1>=<参数值1>] [btgen:<参数名2>=<参数值2>]
    [btpp:<参数名1>=<参数值1>]   [btpp:<参数名2>=<参数值2>]
    [bta:<参数名1>=<参数值1>]   [bta:<参数名2>=<参数值2>]

  当以这种方式从命令行输入参数时,set_params()函数便会把参数值赋值到相应模块的相应参数。例如CvFGDetector中有个参数是char * alpha1,设需要处理的avi文件位于D:\test.avi,则我们在命令行键入如下命令:
    blobtrack.exe bt=test_bt.avi D:\test.avi fg:alpha1=3.14
    则运行程序blobtrack.exe,对D盘的test.avi视频进行运动跟踪处理,并将CvFGDetector模块的内部参数alpha1用3.14来初始化。实际上,各个模块的内部参数很多,具体的可以通过语句“ char* param = pM->GetParamName(j); ”来查询。

 

以上大约是opencv1.0的,我在用opencv2.0。写下

 

myblobtrack fg=FG_1 bd:Hmin=0.05 bd:Wmin=0.05 btavi=test_bt.avi 2.avi

 

我自己暂时用的就是运行myblobtrack.exe,对2.avi进行处理,将blobentrance detection的模式最小长宽改为0.05,写test_bt.avi 文件做输出。

 

 blobtrack [fg=<fg_name>] [bd=<bd_name>]
          [bt=<bt_name>] [btpp=<btpp_name>]
          [bta=<bta_name>
          [bta_data=<bta_data_name>
          [bt_corr=<bt_corr_way>]
          [btgen=<btgen_name>]
          [track=<track_file_name>]
          [scale=<scale val>] [noise=<noise_name>] [IVar=<IVar_name>]
          [FGTrainFrames=<FGTrainFrames>]
          [btavi=<avi output>] [fgavi=<avi output on FG>]
          <avi_file>
  <bt_corr_way> is way of blob position corrrection for "Blob
Tracking" module
     <bt_corr_way>=none,PostProcRes 

<noise_name> = 

  • No,
  • Gauss_10,
  • Gauss_20,
  • Salt&Pepper_0.01,
  • Salt&Pepper_0.05

  <IVar_name> = 




  • No,
  • I+=0.1,
  • I+=1

<scale val> is scale ratio for the source video

  <FGTrainFrames> is number of frames for FG training
  <track_file_name> is file name for save tracked trajectories
  <bta_data> is file name for data base of trajectory analysis module
  <avi_file> is file name of avi to process by BlobTrackerAuto

<yml_file video1 video2 video3> are yml file name and videos used to create

    synthetic film to test blobtracking system


Modules:
<fg_name> is "FG/BG Detection" module name and can be:
  1. FG_0 - Foreground Object Detection from Videos Containing
Complex Background. ACM MM2003.
  2. FG_0S - Simplified version of FG_0
  3. FG_1 - Adaptive background mixture models for real-time
tracking. CVPR1999
<bd_name> is "Blob Entrance Detection" module name and can be:
  1. BD_CC - Detect new blob by tracking CC of FG mask
  2. BD_Simple - Detect new blob by uniform moving of connected
components of FG mask
<bt_name> is "Blob Tracking" module name and can be:
  1. CCMSPF - connected component tracking and MSPF resolver for
collision
  2. CC - Simple connected component tracking
  3. MS - Mean shift algorithm
  4. MSFG - Mean shift algorithm with FG mask using
  5. MSPF - Particle filtering based on MS weight
<btpp_name> is "Blob Trajectory Post Processing" module name and can
be:
  1. Kalman - Kalman filtering of blob position and size
  2. None - No post processing filter
<btgen_name> is "Blob Trajectory Generation" module name and can be:
  1. YML - Generate track record in YML format as synthetic video data
  2. RawTracks - Generate raw track record (x,y,sx,sy),()... in each
line
<bta_name> is "Blob Trajectory Analysis" module name and can be:
  1. HistPVS - Histogram of 5D feature vector analysis
(x,y,vx,vy,state)
  2. None - No trajectory analiser
  3. HistP - Histogram of 2D feature vector analysis (x,y)
  4. HistPV - Histogram of 4D feature vector analysis (x,y,vx,vy)
  5. HistSS - Histogram of 4D feature vector analysis
(startpos,endpos)
  6. TrackDist - Compare tracks directly
  7. IOR - Integrator (by OR operation) of several analysers

 

 

 

 

 

 blobtrack [fg=<fg_name>] [bd=<bd_name>]\n"

" [bt=<bt_name>] [btpp=<btpp_name>]\n"

" [bta=<bta_name>\n"

" [bta_data=<bta_data_name>\n"

 

 

" [bt_corr=<bt_corr_way>]\n"

" [btgen=<btgen_name>]\n"

" [track=<track_file_name>]\n"

" [scale=<scale val>] [noise=<noise_name>] [IVar=<IVar_name>]\n"

" [FGTrainFrames=<FGTrainFrames>]\n"

" [btavi=<avi output>] [fgavi=<avi output on FG>]\n"

" <avi_file>\n"

myblobtrack fg=FG_0s bd:hmin=0.08 bt=CCMSPF  btpp=Kalman bt_corr=PostProcRes btgen=YML track=id021301.txt btavi=test_021301.avi fgavi=f021301.avi 021301.avi

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值