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

📄 main.cpp

📁 国外一个大牛人写的MEAN-SHIFT目标跟踪算法
💻 CPP
字号:
/***************************************************************************                          main.cpp  -  description                             -------------------    begin                : Sun Sep  2 20:08:37 EDT 2001    copyright            : (C) 2001 by Alper Yilmaz    email                : yilmaz@cs.ucf.edu
	with modifications by Paul Smith  rsmith@cs.ucf.edu ***************************************************************************/#ifdef HAVE_CONFIG_H#include <config.h>#endif
#include "highgui.h"
#include "cv.h"
#include "cvaux.h"
#include <iostream.h>#include <stdlib.h>#include <stdio.h>#include <fstream.h>#include <time.h>#include <string.h>#include "cmyimage.h"#include "CTrack.h"#include "CPixel.h"int main(int argc, char *argv[]){	int		color_bins;	CTrack 	*track;    int 	number_of_entries,i;    int		start,end;    int		window_radius;    char	*input_file_name  =new char[100];    char	*output_folder_name =new char[100];    char	*frame_name =new char[50];    char	*frame_type =new char[50];	CPixel	center;	int 	start_time,stop_time;    //struct  time t;    	ifstream infile;	infile.open(argv[1],ios::in);		if (infile.fail())	{		cout << "\n  nosuch file <"<<argv[1]<<">\n\n";		return EXIT_SUCCESS;	}    infile >> number_of_entries;    for (i=0;i<number_of_entries;i++)    {		track=new CTrack;				infile >> input_file_name;		infile >> output_folder_name;		infile >> frame_name;
				infile >> center.x >> center.y ;		infile >> start >> end >> window_radius;		infile >> color_bins;		infile >> frame_type;		cout <<"sequnence ["<<i+1<<"-"<<number_of_entries<<"]"<<endl;        start_time= time(NULL);				track->track_target(input_file_name,						    output_folder_name,							frame_name,							frame_type,        					start, end, center,							window_radius, color_bins);						        stop_time= time(NULL);				        delete track;    }    infile.close();    delete input_file_name;    delete output_folder_name;    delete frame_name;    delete frame_type;  	  	return EXIT_SUCCESS;}

⌨️ 快捷键说明

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