资源简介
多目标跟踪源码,运动目标跟踪,代码,适用于桌面平台
代码片段和文件信息
/* Copyright (C) 2012 Christian Lutz Thorsten Engesser
*
* This file is part of motld
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation either version 3 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not see .
*/
/*
This is a live demo invoking a webcam.
It makes use of OpenCV to capture the frames and highgui to display the output.
Use your mouse to draw bounding boxes for tracking.
There are some keys to customize which components are displayed:
D - dis/enable drawing of detections (green boxes)
P - dis/enable drawing of learned patches
T - dis/enable drawing of tracked points
L - dis/enable learning
S - save current classifier to CLASSIFIERFILENAME
O - load classifier from CLASSIFIERFILENAME (not implemented)
R - reset classifier (not implemented)
ESC - exit
*/
#include
#include
//#include “cv.h“
//#include “highgui.h“
#include
#include “MultiobjectTLD.h“
#define LOADCLASSIFIERATSTART 0
#define CLASSIFIERFILENAME “test.moctld“
//uncomment if you have a high resolution camera and want to speed up tracking
#define FORCE_RESIZING
#define RESOLUTION_X 320
#define RESOLUTION_Y 240
#define MOUSE_MODE_MARKER 0
#define MOUSE_MODE_ADD_BOX 1
#define MOUSE_MODE_IDLE 2
IplImage* curImage = NULL;
bool ivQuit = false;
int ivWidth ivHeight;
CvCapture* capture;
objectBox mouseBox = {00000};
int mouseMode = MOUSE_MODE_IDLE;
int drawMode = 255;
bool learningEnabled = true save = false load = false reset = false;
void Init(int argc char *argv[]);
void* Run(void*);
void HandleInput(int interval = 1);
void MouseHandler(int event int x int y int flags void* param);
void FromRGB(Matrix& maRed Matrix& maGreen Matrix& maBlue);
int main(int argc char *argv[])
{
Init(argc argv);
Run(0);
cvDestroyAllWindows();
return 0;
}
void Init(int argc char *argv[])
{
capture = cvCaptureFromCAM(CV_CAP_ANY);
if(!capture){
std::cout << “error starting video capture“ << std::endl;
exit(0);
}
//propose a resolution
cvSetCaptureProperty(capture CV_CAP_PROP_frame_WIDTH 640);
cvSetCaptureProperty(capture CV_CAP_PROP_frame_HEIGHT 480);
//get the actual (supported) resolution
ivWidth = cvGetCaptureProperty(capture CV_CAP_PROP_frame_WIDTH);
ivHeight = cvGetCaptureProperty(capture CV_CAP_PROP_frame_HEIGHT);
std::cout << “camera/video resolution: “ << ivWidth << “x“ << ivHeight << std::endl;
#ifdef FORCE_RESIZING
ivWidth = RESOLUTION_X;
ivHe
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 620032 2014-07-10 09:35 MulTLD\Debug\MulTLD.exe
文件 1200224 2014-07-10 09:35 MulTLD\Debug\MulTLD.ilk
文件 3492864 2014-07-10 09:35 MulTLD\Debug\MulTLD.pdb
文件 7509 2014-07-10 09:17 MulTLD\MulTLD\camExample.cpp
文件 45522 2014-07-10 09:35 MulTLD\MulTLD\Debug\BuildLog.htm
文件 3070695 2014-07-10 09:34 MulTLD\MulTLD\Debug\camExample.obj
文件 65 2014-07-10 09:35 MulTLD\MulTLD\Debug\mt.dep
文件 663 2014-07-10 09:35 MulTLD\MulTLD\Debug\MulTLD.exe.em
文件 728 2014-07-10 09:35 MulTLD\MulTLD\Debug\MulTLD.exe.em
文件 621 2014-07-10 09:35 MulTLD\MulTLD\Debug\MulTLD.exe.intermediate.manifest
文件 470016 2014-07-10 09:34 MulTLD\MulTLD\Debug\vc90.idb
文件 1249280 2014-07-10 09:34 MulTLD\MulTLD\Debug\vc90.pdb
文件 14958 2012-06-11 18:18 MulTLD\MulTLD\dirent.h
文件 46840 2014-07-10 09:34 MulTLD\MulTLD\FernFilter.h
文件 8767 2012-06-11 18:18 MulTLD\MulTLD\Histogram.h
文件 22268 2012-06-11 18:18 MulTLD\MulTLD\LKTracker.h
文件 42590 2014-07-10 09:17 MulTLD\MulTLD\Matrix.h
文件 30518 2012-06-11 18:18 MulTLD\MulTLD\Multiob
文件 5012 2014-07-10 09:06 MulTLD\MulTLD\MulTLD.vcproj
文件 1409 2014-07-10 09:44 MulTLD\MulTLD\MulTLD.vcproj.DATEM2.Eway.user
文件 15724 2012-06-11 18:18 MulTLD\MulTLD\NNClassifier.h
文件 40858 2014-07-10 09:36 MulTLD\MulTLD\Release\BuildLog.htm
文件 2415123 2014-07-10 09:36 MulTLD\MulTLD\Release\camExample.obj
文件 65 2014-07-10 09:36 MulTLD\MulTLD\Release\mt.dep
文件 616 2014-07-10 09:36 MulTLD\MulTLD\Release\MulTLD.exe.intermediate.manifest
文件 150528 2014-07-10 09:36 MulTLD\MulTLD\Release\vc90.idb
文件 1019904 2014-07-10 09:36 MulTLD\MulTLD\Release\vc90.pdb
文件 10226 2014-07-10 09:40 MulTLD\MulTLD\runtime.txt
文件 6832 2012-06-11 18:18 MulTLD\MulTLD\Utils.h
文件 11570176 2014-07-10 09:44 MulTLD\MulTLD.ncb
............此处省略13个文件信息
- 上一篇:SAP 业务流程大全2
- 下一篇:校园二手网毕业设计+论文.rar
评论
共有 条评论