亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mainfrm.cpp

?? 圖像處理軟件,功能比較基礎
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
		strcpy(inputFileName,dlg.m_sar_path);
		strcpy(inputRefSarName,dlg.m_ref_path);
		strcpy(outputtxtName,dlg.m_txt_path);	
		r=new int [dlg.m_num];
		c=new int [dlg.m_num];
		fp=fopen(dlg.m_inputpath,"r");
		fseek( fp, 76, SEEK_SET );
		fscanf( fp, "%d", &r[0] );
		fseek(fp,27,SEEK_CUR);
		fscanf(fp,"%d",&c[0]);	
		for (i=1;i<dlg.m_num;i++)
		{
			fseek(fp,41,SEEK_CUR);
			fscanf(fp,"%d",&r[i]);
			fseek(fp,27,SEEK_CUR);
			fscanf(fp,"%d",&c[i]);
		}
		fclose(fp);
	

	//===========================生成MASK圖形================================	
	Picture maskpic1;
	maskpic1.row=500;
	maskpic1.col=500;
	maskpic1.p=fspace_2d(maskpic1.row,maskpic1.col);
	for(i=0;i<maskpic1.row;i++)
		for (j=0;j<maskpic1.col;j++)
			maskpic1.p[i][j]=255;
		int span;
		for (i=0;i<maskpic1.row;i++)
			for (j=0;j<maskpic1.col;j++)
			{
				span=(int)(pow(i-maskpic1.row/2,2)+pow(j-maskpic1.col/2,2));
				if(span<=Maskinner*Maskinner||span>Maskouter*Maskouter)
					maskpic1.p[i][j]=0;
			}						
			struct _timeb timebuffer,timebuffer1;				
			_ftime( &timebuffer );
			
			for(int x=0;x<dlg.m_num;x++)
			{
				inputpic.p=InputImageWithName(inputFileName,inputpic.row,inputpic.col);	
				inputref.p=InputImageWithName(inputRefSarName,inputref.row,inputref.col);	
				ref=CComlib::ImgScaleCubicLinear(inputref.p ,inputref.row,inputref.col,320,320 ) ;			
				unsigned char **ttemp,**ttempmask;
				ttemp=fspace_2d(256,256);
				ttempmask=fspace_2d(256,256);
				for(int s=0;s<256;s++)
				{
					memcpy(ttemp[s],inputpic.p[s+122]+122,256);
					memcpy(ttempmask[s],maskpic1.p[s+122]+122,256);						
				}
				POINT temppos;			
				temppos.x=temppos.y=0;
				CMatch match;										
				NPOT ret=match.SingleMatch_Box(ref,ttemp,ttempmask,320,320,256,256,temppos);							
				dspace_2d(ref,320,320);
				FILE *fp;	
				POINT tempresult;
				tempresult.x=(ret.x+128)*(inputref.row/320.0)+c[x]-(inputref.row/2);
				tempresult.y=(ret.y+128)*(inputref.row/320.0)+r[x]-(inputref.row/2);
				fp=fopen(outputtxtName,"a");
				fprintf(fp,"圖片%d",x+1);												
				fprintf(fp," 理論匹配點(%d,%d), 實際匹配結果 (%d,%d),  誤差(%d,%d)  ,相關cor=%f \n",c[x],r[x],tempresult.x,tempresult.y,abs(tempresult.x-c[x]),abs(tempresult.y-r[x]),ret.cor);
				fclose(fp);
				dspace_2d(inputpic.p,inputpic.row,inputpic.col);
				dspace_2d(inputref.p,inputref.row,inputref.col);
				inputpic.p=NULL;
				ChangeNameExtension1(inputFileName);
				ChangeNameExtension1(inputRefSarName);
			}
			delete[] r;
			delete[] c;
	}
	else
		return;		
}



void CMainFrame::OnTestTimeOrg() 
{
	int i,j,rect_length,rect_centre;
	int Maskinner,Maskouter;
	unsigned char **TempImg;
	RadonResult res;
	int true_theta;
	POINT firstpos,endpos;
	int num=0;
	
	CMatchDlg dlg;
	unsigned char **ref;
	FILE *fp;
	int r,c;
	
	//=======================================================================
	char inputFileName[512];
	char inputRefSarName[512];
	char outputtxtName[512];
	Picture inputpic,inputref;
	
	//=======================================================================
	//::MessageBox(NULL,"BEGIN","WARNING",MB_OK);
	//===================================初始化變量區========================
	int result[8];					
	if(dlg.DoModal()==IDOK)
	{
		true_theta=dlg.m_truecorner;
		Maskinner=dlg.m_mask_inner;
		Maskouter=dlg.m_mask_outer;
		rect_length=dlg.m_rect_length;
		rect_centre=76;//(Maskouter-Maskinner)/2+Maskinner;
		strcpy(inputFileName,dlg.m_sar_path);
		strcpy(inputRefSarName,dlg.m_ref_path);
		strcpy(outputtxtName,dlg.m_txt_path);			
		fp=fopen(dlg.m_inputpath,"r");
		fseek( fp, 76, SEEK_SET );
		fscanf( fp, "%d", &r );
		fseek(fp,27,SEEK_CUR);
		fscanf(fp,"%d",&c);	
		fclose(fp);
		
		
		//===========================生成MASK圖形================================	
		Picture maskpic1;
		maskpic1.row=500;
		maskpic1.col=500;
		maskpic1.p=fspace_2d(maskpic1.row,maskpic1.col);
		for(i=0;i<maskpic1.row;i++)
			for (j=0;j<maskpic1.col;j++)
				maskpic1.p[i][j]=255;
			int span;
			for (i=0;i<maskpic1.row;i++)
				for (j=0;j<maskpic1.col;j++)
				{
					span=(int)(pow(i-maskpic1.row/2,2)+pow(j-maskpic1.col/2,2));
					if(span<=Maskinner*Maskinner||span>Maskouter*Maskouter)
						maskpic1.p[i][j]=0;
				}								
				inputpic.p=InputImageWithName(inputFileName,inputpic.row,inputpic.col);	
				inputref.p=InputImageWithName(inputRefSarName,inputref.row,inputref.col);	
				ref=CComlib::ImgScaleCubicLinear(inputref.p ,inputref.row,inputref.col,320,320 ) ;			
				unsigned char **ttemp,**ttempmask;
				ttemp=fspace_2d(256,256);
				ttempmask=fspace_2d(256,256);
				for(int s=0;s<256;s++)
				{
					memcpy(ttemp[s],inputpic.p[s+122]+122,256);
					memcpy(ttempmask[s],maskpic1.p[s+122]+122,256);						
				}
				struct _timeb timebuffer,timebuffer1;				
				_ftime( &timebuffer );
				for(int x=0;x<20;x++)
				{	
					
					POINT temppos;			
					temppos.x=temppos.y=0;
					CMatch match;										
					NPOT ret=match.SingleMatch_Box(ref,ttemp,ttempmask,320,320,256,256,temppos);											
					POINT tempresult;
					tempresult.x=(ret.x+128)*(inputref.row/320.0)+c-(inputref.row/2);
					tempresult.y=(ret.y+128)*(inputref.row/320.0)+r-(inputref.row/2);
				}
				_ftime( &timebuffer1);
				int second=(int)(timebuffer1.time-timebuffer.time);
				char buffer[100];
				_itoa( second, buffer, 10 );
				dspace_2d(ref,320,320);
				dspace_2d(inputpic.p,inputpic.row,inputpic.col);
				dspace_2d(inputref.p,inputref.row,inputref.col);
				inputpic.p=NULL;
				::MessageBox(NULL,buffer,"Warning",MB_OK);
	}
	else
		return;		
	
	
	
}

void CMainFrame::OnTestTimeNew() 
{
	int i,j,rect_length,rect_centre;
	int Maskinner,Maskouter;
	unsigned char **TempImg;
	RadonResult res;
	int true_theta;
	POINT firstpos,endpos;
	int num=0;
	
	CMatchDlg dlg;
	unsigned char **ref;
	FILE *fp;
	int r,c;
	
	
	char inputFileName[512];
	char inputRefSarName[512];
	char outputtxtName[512];
	Picture inputpic,inputref;
	
	int result[8];					
	if(dlg.DoModal()==IDOK)
	{
		true_theta=dlg.m_truecorner;
		Maskinner=dlg.m_mask_inner;
		Maskouter=dlg.m_mask_outer;
		rect_length=dlg.m_rect_length;
		rect_centre=76;//(Maskouter-Maskinner)/2+Maskinner;
		strcpy(inputFileName,dlg.m_sar_path);
		strcpy(inputRefSarName,dlg.m_ref_path);
		strcpy(outputtxtName,dlg.m_txt_path);	
		fp=fopen(dlg.m_inputpath,"r");
		fseek( fp, 76, SEEK_SET );
		fscanf( fp, "%d", &r );
		fseek(fp,27,SEEK_CUR);
		fscanf(fp,"%d",&c);			
		fclose(fp);
	
	TempImg=fspace_2d(rect_length,rect_length);
	if(TempImg==NULL)
		return;
	//===========================生成MASK圖形================================	
	Picture maskpic1;
	unsigned char **mask;	
	maskpic1.row=500;
	maskpic1.col=500;
	maskpic1.p=fspace_2d(maskpic1.row,maskpic1.col);
	POINT tempresult;
	CMatch match;										
	unsigned char **outsar;
	outsar=fspace_2d(rect_length,rect_length);
	mask=fspace_2d(rect_length,rect_length);

	for(i=0;i<maskpic1.row;i++)
		for (j=0;j<maskpic1.col;j++)
			maskpic1.p[i][j]=255;
		int span;
		for (i=0;i<maskpic1.row;i++)
			for (j=0;j<maskpic1.col;j++)
			{
				span=(int)(pow(i-maskpic1.row/2,2)+pow(j-maskpic1.col/2,2));
				if(span<=Maskinner*Maskinner||span>Maskouter*Maskouter)
					maskpic1.p[i][j]=0;
			}							
			//=======================================================================
			
				inputpic.p=InputImageWithName(inputFileName,inputpic.row,inputpic.col);	
				inputref.p=InputImageWithName(inputRefSarName,inputref.row,inputref.col);	
				ref=CComlib::ImgScaleCubicLinear(inputref.p ,inputref.row,inputref.col,320,320 ) ;
								struct _timeb timebuffer,timebuffer1;				
				_ftime( &timebuffer );
			for(int x=0;x<20;x++)
			{
				
				num=0;					
				for (int theta=0;theta<360;theta=theta+45)
				{
					j=(int)(inputpic.col/2.0-rect_centre*cos(theta*3.1416/180.0));
					i=(int)(inputpic.row/2.0-rect_centre*sin(theta*3.1416/180.0));
					{			
						for (int k=0;k<rect_length;k++)							
						{								
							memcpy(TempImg[k],inputpic.p[i+k-(int)(rect_length/2.0)]+j-(int)(rect_length/2.0),rect_length);
						} 					
						radon(TempImg,rect_length,rect_length,&res);
						if(abs(res.theta-true_theta)<=7)
						{						
							result[num]=res.avernum;
						}	
						else
						{
							result[num]=256;
						}
						num++;
					}
				}	
				int temp1=256;
				int Angle;	
				for (int t=0;t<8;t++)
				{
					if(temp1>result[t])
					{
						temp1=result[t];
						Angle=t*45;
					}
				}
				firstpos.x=(int)(inputpic.col/2.0-rect_centre*cos(Angle*3.1416/180.0));
				firstpos.y=(int)(inputpic.row/2.0-rect_centre*sin(Angle*3.1416/180.0));
				POINT temppos;
				temppos.x=firstpos.x-(rect_length/2.0);
				temppos.y=firstpos.y-(rect_length/2.0);
				for (int k=0;k<rect_length;k++)					
				{
					memcpy(outsar[k],inputpic.p[temppos.y+k]+temppos.x,rect_length);
					memcpy(mask[k],maskpic1.p[temppos.y+k]+temppos.x,rect_length);						
				} 										
				NPOT ret=match.SingleMatch_Box(ref,outsar,mask,320,320,rect_length,rect_length,temppos);									
				tempresult.x=(ret.x+(250-firstpos.x+rect_length/2.0))*(inputref.row/320.0)+c-(inputref.row/2);
				tempresult.y=(ret.y+(250-firstpos.y+rect_length/2.0))*(inputref.row/320.0)+r-(inputref.row/2);
			}
			_ftime( &timebuffer1);
			int second=timebuffer1.time-timebuffer.time;
			char buffer[100];
			_itoa( second, buffer, 10 );
			dspace_2d(ref,320,320);
			dspace_2d(outsar,rect_length,rect_length);
			dspace_2d(mask,rect_length,rect_length);				
			dspace_2d(inputpic.p,inputpic.row,inputpic.col);
			dspace_2d(inputref.p,inputref.row,inputref.col);		
			::MessageBox(NULL,buffer,"WARNING",MB_OK);						
}
}
#include "COutDlg.h"
void CMainFrame::OnOutMathc() 
{
	unsigned char **Input_Rel,**Input_Ref;
	int row_ref,col_ref,row_rel,col_rel;
	CCOutDlg dlg;
	BOOL flag;
	if(dlg.DoModal()==IDOK)
	{
		flag=dlg.m_check;
		if(dlg.m_refpath==""||dlg.m_relpath=="")
		{
			::MessageBox(NULL,"輸入參數不完整","WARNING",MB_OK);
			return;
		}

		Input_Rel=InputImageWithName(dlg.m_relpath,row_rel,col_rel);
		Input_Ref=InputImageWithName(dlg.m_refpath,row_ref,col_ref);
		if(row_rel>row_ref||col_rel>col_ref)
		{
			dspace_2d(Input_Rel,row_rel,col_rel);
			dspace_2d(Input_Ref,row_ref,col_ref);
			::MessageBox(NULL,"實時圖比參考圖小","WARNING",MB_OK);
			return;
		}

		if(row_rel%2!=0&&col_rel%2!=0)
		{
			dspace_2d(Input_Rel,row_rel,col_rel);
			dspace_2d(Input_Ref,row_ref,col_ref);
			::MessageBox(NULL,"實時圖不能被均分成四塊","WARNING",MB_OK);
			return;
		}
		unsigned char **smallpic[4];
		for (int i=0;i<4;i++)
		smallpic[i]=fspace_2d(row_rel/2,col_rel/2);
		for (i=0;i<row_rel/2;i++)			
		{
			memcpy(smallpic[0][i],Input_Rel[i],col_rel/2);
			memcpy(smallpic[1][i],Input_Rel[i]+col_rel/2*1,col_rel/2);
			memcpy(smallpic[2][i],Input_Rel[i+row_rel/2*1],col_rel/2);
			memcpy(smallpic[3][i],Input_Rel[i+row_rel/2*1]+col_rel/2*1,col_rel/2);	
		}
		unsigned char **mask;
		mask=fspace_2d(row_rel/2,col_rel/2);
		for (i=0;i<row_rel/2;i++)
			for (int j=0;j<col_rel/2;j++)
				mask[i][j]=255;
		//OutputImageWithName(smallpic[0],row_rel/2,col_rel/2,"c:\\1.pic");
		//OutputImageWithName(smallpic[1],row_rel/2,col_rel/2,"c:\\2.pic");
		//OutputImageWithName(smallpic[2],row_rel/2,col_rel/2,"c:\\3.pic");
		//OutputImageWithName(smallpic[3],row_rel/2,col_rel/2,"c:\\4.pic");
		CMatch match;
		NPOT result[4];
		for (i=0;i<4;i++)
		{
			result[i]=match.SingleMatch_Box1(Input_Ref,smallpic[i],mask,row_ref,col_ref,row_rel/2,col_ref/2,flag);
		}
		for (i=0;i<4;i++)
			dspace_2d(smallpic[i],row_rel/2,col_rel/2);
		dspace_2d(mask,row_rel/2,col_rel/2);
		dspace_2d(Input_Rel,row_rel,col_rel);
		dspace_2d(Input_Ref,row_ref,col_ref);
		char buffer[500];
		if(flag==FALSE)
			wsprintf(buffer,"左上塊(%d,%d)           右上塊塊(%d,%d)\n左下塊(%d,%d)           右下塊(%d,%d)",result[0].x,result[0].y
			,result[1].x,result[1].y
			,result[2].x,result[2].y
			,result[3].x,result[3].y);
		else if(flag==TRUE)
		wsprintf(buffer,"反轉\n左上塊(%d,%d)           右上塊塊(%d,%d)\n左下塊(%d,%d)           右下塊(%d,%d)",result[0].x,result[0].y
			,result[1].x,result[1].y
			,result[2].x,result[2].y
			,result[3].x,result[3].y);
		::MessageBox(NULL,buffer,"RESULT",MB_OK);
	}
	
	
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www.欧美精品一二区| 国产伦精品一区二区三区免费迷 | 97精品久久久久中文字幕| 欧美精品日日鲁夜夜添| 国产精品天天看| 黄一区二区三区| 欧美色视频在线观看| 国产精品入口麻豆原神| 美美哒免费高清在线观看视频一区二区| 成人亚洲一区二区一| 欧美一级午夜免费电影| 亚洲精品福利视频网站| 亚洲人成网站精品片在线观看| 日韩精品一级二级| 国产色一区二区| 亚洲chinese男男1069| 国产凹凸在线观看一区二区| 777欧美精品| 亚洲激情六月丁香| 不卡的av中国片| 国产午夜亚洲精品午夜鲁丝片| 同产精品九九九| 在线一区二区三区做爰视频网站| 国产精品毛片a∨一区二区三区| 黑人巨大精品欧美黑白配亚洲| 日韩一区二区中文字幕| 日韩电影一区二区三区四区| 3751色影院一区二区三区| 夜夜爽夜夜爽精品视频| 色综合久久88色综合天天6| 国产精品成人免费| 99精品久久只有精品| 国产综合成人久久大片91| 欧美巨大另类极品videosbest| 欧美日韩高清一区二区三区| 亚洲女爱视频在线| 97精品电影院| 亚洲精品欧美专区| 欧洲生活片亚洲生活在线观看| 亚洲欧美激情插| 色哟哟国产精品| 亚洲一卡二卡三卡四卡无卡久久| 91影院在线免费观看| 亚洲精品国产精品乱码不99| 91精品福利在线| 亚洲va国产va欧美va观看| 欧美日韩中文精品| 调教+趴+乳夹+国产+精品| 欧美高清hd18日本| 韩国三级在线一区| 国产精品入口麻豆原神| 一本色道久久综合狠狠躁的推荐| 亚洲最大成人网4388xx| 欧美精品乱码久久久久久按摩| 日本中文在线一区| 国产午夜精品美女毛片视频| 成人精品视频一区| 亚洲五码中文字幕| 精品国产一区二区三区久久久蜜月| 丁香桃色午夜亚洲一区二区三区| 国产精品热久久久久夜色精品三区 | 亚洲精品高清视频在线观看| 欧美久久久久中文字幕| 国产乱淫av一区二区三区 | 欧美mv和日韩mv国产网站| 成人动漫一区二区在线| 亚洲一区二区视频在线观看| 精品久久久三级丝袜| 91麻豆成人久久精品二区三区| 日韩1区2区3区| 国产精品美女久久久久高潮| 欧美精三区欧美精三区| 国产成人精品免费视频网站| 一区二区三区日韩在线观看| 久久伊人中文字幕| 欧美综合在线视频| 国产成人一级电影| 视频一区在线播放| 中文字幕人成不卡一区| 日韩一区二区免费电影| 99天天综合性| 国产综合色在线| 亚洲成a人v欧美综合天堂下载| 久久精品日韩一区二区三区| 欧美日韩国产区一| 91女厕偷拍女厕偷拍高清| 国产专区综合网| 五月激情六月综合| 一区二区三区中文字幕电影| 久久婷婷色综合| 欧美亚洲综合一区| 成人avav影音| 国产高清一区日本| 狠狠色综合日日| 蜜臀a∨国产成人精品| 亚洲综合视频在线观看| 亚洲视频在线观看一区| 日本一区二区三区国色天香| 日韩免费看网站| 欧美日韩国产天堂| 欧美影院精品一区| 日本久久电影网| 波多野结衣一区二区三区 | 国产日产亚洲精品系列| 日韩欧美国产一区二区在线播放 | 日韩精品最新网址| 4438x成人网最大色成网站| 欧美日韩性生活| 91电影在线观看| 欧美在线免费观看视频| 97久久久精品综合88久久| 成人一区在线观看| 粉嫩av一区二区三区在线播放 | 午夜精品久久久久久久99水蜜桃| 亚洲日本免费电影| 伊人婷婷欧美激情| 亚洲综合色噜噜狠狠| 樱桃视频在线观看一区| 一区二区三区在线观看视频| 一区二区三区中文字幕| 亚洲成人动漫在线观看| 日本成人中文字幕| 九九九精品视频| 国产成人综合在线观看| 国产91精品在线观看| 成人av中文字幕| 日本精品免费观看高清观看| 欧美视频自拍偷拍| 日韩视频免费直播| 久久久精品影视| 亚洲日本va午夜在线电影| 亚洲欧洲综合另类| 天天综合色天天综合色h| 免费观看日韩av| 国产福利一区二区三区在线视频| 成人深夜在线观看| 精品免费一区二区三区| 久久久久国色av免费看影院| 中文字幕成人在线观看| 亚洲与欧洲av电影| 免费成人深夜小野草| 国产乱色国产精品免费视频| 91色.com| 欧美www视频| 中文字幕人成不卡一区| 五月天一区二区| 国产成人综合亚洲网站| 91搞黄在线观看| 久久久久9999亚洲精品| 亚洲色图欧美偷拍| 美女高潮久久久| 白白色亚洲国产精品| 欧美狂野另类xxxxoooo| 日本一区二区三区在线不卡| 午夜视频在线观看一区| 国产.精品.日韩.另类.中文.在线.播放 | 国产三级一区二区三区| 亚洲精品亚洲人成人网| 久久99精品久久久久久国产越南 | 亚洲精品一区二区三区香蕉| 亚洲欧美一区二区三区久本道91| 美脚の诱脚舐め脚责91| 色婷婷久久久亚洲一区二区三区| 日韩欧美国产小视频| 一区二区三区国产精品| 国产成人精品三级麻豆| 欧美一区二区三区在线观看视频| 国产精品久久久久久久久搜平片| 秋霞国产午夜精品免费视频| 91在线视频18| 国产日韩精品一区| 另类小说一区二区三区| 欧美午夜电影网| 中文字幕一区在线观看| 黄页视频在线91| 日韩一区二区三区精品视频| 亚洲午夜在线观看视频在线| eeuss鲁片一区二区三区在线观看| 精品乱人伦小说| 日本人妖一区二区| 欧美男同性恋视频网站| 亚洲女爱视频在线| av一区二区三区四区| 中文字幕欧美激情一区| 国产自产v一区二区三区c| 欧美一级高清片| 免费成人在线观看| 欧美理论电影在线| 亚洲午夜免费电影| 91久久精品日日躁夜夜躁欧美| 亚洲欧洲日韩在线| 99视频精品全部免费在线| 久久精品人人做人人综合 | 97精品国产露脸对白| 中文av一区二区| www.亚洲国产| 秋霞国产午夜精品免费视频| 欧美性色黄大片| 午夜精品久久一牛影视| 欧美视频在线不卡|