Home » Source Code » UAV aerial video mosaics » autostitch.cpp

autostitch.cpp ( File view )

  • By YU 2014-05-21
  • View(s):91
  • Download(s):18
  • Point(s): 3
			// autostitch.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include "autostitch.h"
#include "MyCompile.h"
#include "TestFuc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

//1表示正常拼接,0表示测试
#define STARTFUNCTION  1
// 唯一的应用程序对象
CWinApp theApp;
using namespace my_namespace;

string result_name = "result.jpg";


#if STARTFUNCTION
//入口函数
int main(int argc, TCHAR* argv[], TCHAR* envp[])
{

	int nRetCode = 0;
	// 初始化 MFC 并在失败时显示错误
	if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
	{

		// TODO: 更改错误代码以符合您的需要
		_tprintf(_T("错误: MFC 初始化失败\n"));
		nRetCode = 1;
	
}
	else
	{

		CMyCompile compile;
		Mat pano;
		CString str=_T("c:\\pic\\31");
		bool stitchbool=false;
		compile.createDefault(false);

		printf("开始读图像...\n");  
		compile.openImages(str);
		printf("读入的图像总数\n%d\n",compile.imgs.size());
		printf("读图像结束!\n\n");
		
		printf("开始拼接: \n");
				
		printf("正在执行拼接:");
		__int64 mytime=getTickCount();
		stitchbool = compile.autostitch(compile.imgs, pano);
		mytime=getTickCount()-mytime;
		fprintf(stdout,"\n拼接时间为: %f s\n",mytime/(getTickFrequency()));
		printf("拼接完成!\n");
		if (stitchbool != true)
		{

			cout << "Can't stitch images." << endl;
			return -1;
		
}

		imwrite(result_name, pano);
		imshow("拼接结果",pano);
		waitKey(0);
		system("pause");
	
}
	return nRetCode;

}
#else

//入口函数
void main()
{

	CTestFuc testFuc;
	testFuc.TestMatch();
	

}

#endif			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 3

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
autostitch.aps17.46 kB28-02-13 07:50
autostitch.cpp1.53 kB05-11-13 09:50
autostitch.h39.00 B10-12-12 20:48
autostitch.rc1.34 kB10-12-12 20:48
autostitch.vcproj5.58 kB05-11-13 09:52
autostitch.vcproj.HUANG.shui.user1.37 kB09-06-13 09:26
autostitch.vcproj.lenovo-PC.lenovo.user1.38 kB15-12-12 21:35
autostitch.vcproj.SHUI.shui.user1.37 kB05-11-13 09:58
autostitch.vcproj.WIN-B5OD78NL8FV.Administrator.user1.39 kB25-07-13 08:10
autostitch.vcproj.WM-20120911FOZO.shui.user1.39 kB17-12-12 08:38
autostitch.vcproj.WM-20140502VVLE.Administrator.user1.39 kB09-05-14 15:37
confidence.txt90.59 kB25-07-13 10:02
confidence14da.txt6.31 kB25-06-13 18:51
confidence200.txt1.92 MB23-06-13 23:18
confidence5.txt1.37 kB24-06-13 14:02
autostitch.pch32.25 MB05-11-13 09:54
BuildLog.htm77.02 kB05-11-13 09:54
stdafx.obj999.54 kB05-11-13 09:54
vc90.idb315.00 kB05-11-13 09:54
vc90.pdb2.55 MB05-11-13 09:54
Jacbion.xml60.00 B25-07-13 18:23
match.txt4.73 kB25-07-13 10:02
match.xml108.03 kB25-07-13 10:02
match14da.txt1.61 kB25-06-13 19:01
match200.txt8.56 kB24-06-13 08:25
match5.txt212.00 B24-06-13 15:00
match_features.txt5.16 kB25-07-13 10:02
match_features01.txt4.85 kB24-06-13 21:36
match_features14da.txt360.76 kB25-06-13 18:51
mat_xml.xml30.00 kB21-06-13 10:17
MyCompile.cpp71.44 kB27-07-13 14:30
MyCompile.h3.08 kB25-06-13 21:38
mydetector.cpp49.80 kB05-11-13 09:54
mydetector.h8.91 kB15-07-13 19:14
precomp.h2.47 kB28-07-12 06:59
qian.xml48.31 kB25-07-13 18:23
ReadMe.txt1.63 kB10-12-12 20:48
Resource.h393.00 B10-12-12 20:48
result14.00 B97% 14-07-13
result.jpg2.23 MB09-07-13 19:35
result0.jpg2.54 MB30-05-13 11:05
result00.jpg680.30 kB31-05-13 20:12
result10.jpg56.18 kB31-05-13 14:29
result10_.jpg59.45 kB31-05-13 14:35
result14.jpg1.63 MB22-06-13 12:22
result141.jpg748.67 kB25-06-13 18:57
result18.jpg77.57 kB17-06-13 18:26
result19.jpg322.94 kB19-06-13 03:36
result2.jpg1.69 MB30-05-13 18:21
result21.jpg483.43 kB30-05-13 19:12
result26.jpg375.77 kB15-07-13 13:32
<result27>0.00 B96% 24-07-13
result27.jpg2.23 MB15-07-13 20:02
result30.jpg2.52 MB24-07-13 19:25
resultff.jpg28.84 kB31-05-13 14:40
resultguangsu.jpg402.75 kB21-06-13 10:17
resultmulti.jpg366.37 kB30-05-13 16:39
result冲投影.jpg298.42 kB21-06-13 11:05
stdafx.cpp215.00 B10-12-12 20:48
stdafx.h813.00 B10-12-12 20:48
targetver.h1.00 kB10-12-12 20:48
TestFuc.cpp847.00 B23-05-13 10:54
TestFuc.h248.00 B07-05-13 09:01
transform.xml60.00 B25-07-13 18:23
result.jpg598.37 kB24-05-13 08:22
Thumbs.db12.50 kB31-05-13 09:46
发大水.jpg294.10 kB24-05-13 21:51
没有强行赋值.jpg363.02 kB24-05-13 10:37
<重投影>0.00 B99% 24-05-13
autostitch.ncb17.58 MB09-05-14 15:37
autostitch.sln896.00 B10-12-12 20:48
autostitch.suo138.00 kB09-05-14 15:37
<autostitch.ilk>0.00 B27-07-13 14:30
confidence.txt5.91 kB13-07-13 10:22
Jacbion.xml60.00 B22-06-13 08:20
match.txt1.34 kB13-07-13 10:22
match.xml13.32 kB13-07-13 10:22
match_features.txt21.78 kB13-07-13 10:22
mat_xml.xml1.14 MB21-06-13 09:54
qian.xml13.34 kB22-06-13 08:20
result.jpg1.11 kB22-06-13 08:20
result5.jpg297.38 kB21-06-13 09:54
<transform.xml>0.00 B13-07-13 10:12
readme.txt192.00 B24-05-13 14:11
<Debug>0.00 B11-01-14 07:12
<拼接结果>0.00 B11-01-14 07:12
<autostitch>0.00 B11-01-14 07:12
<Debug>0.00 B11-01-14 07:12
<autostitch_0610>0.00 B09-05-14 15:35
...
Sponsored links

autostitch.cpp (34.39 MB)

Need 3 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D