資源簡介
對于三維重建,有很大幫助,初學者可以學習
代碼片段和文件信息
/*
??Displays?image?features?from?a?file?on?an?image
??Copyright?(C)?2006-2012??Rob?Hess?
??@version?1.1.2-20100521
*/
#include?“imgfeatures.h“
#include?“utils.h“
#include?
#include?
#include?
#define?OPTIONS?“:oh“
/***************************?Function?Prototypes?*****************************/
static?void?usage(?char*?);
static?void?arg_parse(?int?char**?);
/********************************?Globals?************************************/
char*?pname;
char*?feat_file;
char*?img_file;
int?feat_type?=?FEATURE_LOWE;
/**********************************?Main?*************************************/
int?main(?int?argc?char**?argv?)
{
??IplImage*?img;
??struct?feature*?feat;
??char*?name;
??int?n;
??arg_parse(?argc?argv?);
??img?=?cvLoadImage(?img_file?1?);
??if(?!?img?)
????fatal_error(?“unable?to?load?image?from?%s“?img_file?);
??n?=?import_features(?feat_file?feat_type?&feat?);
??if(?n?==?-1?)
????fatal_error(?“unable?to?import?features?from?%s“?feat_file?);
??name?=?feat_file;
??draw_features(?img?feat?n?);
??cvNamedWindow(?name?1?);
??cvShowImage(?name?img?);
??cvWaitKey(?0?);
??return?0;
}
/**************************?Function?Definitions?*****************************/
/*
??Print?usage?info?for?this?program.
??@param?name?program?name
*/
static?void?usage(?char*?name?)
{
??fprintf(?stderr?“%s:?display?image?features?on?an?image\n\n“?name?);
??fprintf(?stderr?“Usage:?%s?[options]??\n“?name?);
??fprintf(?stderr?“Options:\n“?);
??fprintf(?stderr?“??-h??????Display?this?message?and?exit\n“?);
??fprintf(?stderr?“??-o??????Specifies?that??is?an“ \
???“?Oxford-type?feature?file.??By\n“);
??fprintf(?stderr?“?????????????default?it?is?treated?as?a“ \
???“?Lowe-type?file.\n“?);
}
/*
??arg_parse()?parses?the?command?line?arguments?setting?appropriate?globals.
??
??argc?and?argv?should?be?passed?directly?from?the?command?line
*/
static?void?arg_parse(?int?argc?char**?argv?)
{
??pname?=?basename(?argv[0]?);
??int?arg;
??while(?1?)
????{
??????arg?=?getopt(?argc?argv?OPTIONS?);
??????if(?arg?==?-1?)?
break;
??????switch(?arg?)
{
case?‘:‘:
??fatal_error(?“-%c?option?requires?an?argument\n“ \
???????“Try?‘%s?-h‘?for?help.“?optopt?pname?);
??break;
??
case?‘h‘:
??usage(?pname?);
??exit(0);
??break;
case?‘o‘:
??feat_type?=?FEATURE_OXFD;
??break;
}
????}
??if(?argc?-?optind?!=?2?)
????fatal_error(?“bad?argument?count.\nTry?‘%s?-h‘?for?help.“?pname?);
??feat_file?=?argv[optind++];
??img_file?=?argv[optind];
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????192654??2016-09-26?13:59??SIFT程序vs\123.bmp
?????文件????1060614??2016-09-26?13:58??SIFT程序vs\456.bmp
?????文件??????26361??2016-09-26?14:19??SIFT程序vs\741.jpg
?????文件??????40240??2016-09-26?14:20??SIFT程序vs\852.jpg
?????文件??????30625??2012-07-26?14:48??SIFT程序vs\beaver.png
?????文件??????19484??2012-07-26?14:48??SIFT程序vs\beaver_xform.png
?????文件??????44545??2016-09-26?14:37??SIFT程序vs\coffee1.jpg
?????文件??????39232??2016-09-26?14:37??SIFT程序vs\coffee2.jpg
?????文件???????5150??2016-10-18?13:37??SIFT程序vs\Debug\cl.command.1.tlog
?????文件?????123116??2016-10-18?13:37??SIFT程序vs\Debug\CL.read.1.tlog
?????文件???????4186??2016-10-18?13:37??SIFT程序vs\Debug\CL.write.1.tlog
?????文件??????????2??2016-10-18?13:37??SIFT程序vs\Debug\li
?????文件??????????2??2016-10-18?13:37??SIFT程序vs\Debug\li
?????文件??????????2??2016-10-18?13:37??SIFT程序vs\Debug\li
?????文件??????????2??2016-10-18?13:37??SIFT程序vs\Debug\li
?????文件??????????2??2016-10-18?13:37??SIFT程序vs\Debug\li
?????文件??????????2??2016-10-18?13:37??SIFT程序vs\Debug\li
?????文件???????4388??2016-10-18?13:37??SIFT程序vs\Debug\li
?????文件???????9240??2016-10-18?13:37??SIFT程序vs\Debug\li
?????文件???????1898??2016-10-18?13:37??SIFT程序vs\Debug\li
?????文件????????402??2016-10-18?13:37??SIFT程序vs\Debug\mt.command.1.tlog
?????文件????????198??2016-10-18?13:37??SIFT程序vs\Debug\mt.read.1.tlog
?????文件????????378??2016-10-18?13:37??SIFT程序vs\Debug\mt.write.1.tlog
?????文件????????570??2016-10-18?13:37??SIFT程序vs\Debug\rc.command.1.tlog
?????文件????????350??2016-10-18?13:37??SIFT程序vs\Debug\rc.read.1.tlog
?????文件????????358??2016-10-18?13:37??SIFT程序vs\Debug\rc.write.1.tlog
?????文件???????4386??2016-10-18?13:37??SIFT程序vs\Debug\SIFT.Build.CppClean.log
?????文件????????132??2016-10-18?13:37??SIFT程序vs\Debug\SIFT.lastbuildstate
?????文件??????10870??2016-10-18?13:37??SIFT程序vs\Debug\SIFT.log
?????文件????????198??2016-10-18?13:37??SIFT程序vs\Debug\SIFT_manifest.rc
............此處省略83個文件信息
評論
共有 條評論