91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

像素級遙感圖像融合算法主要有IHS變換法、小波變換法、主成分分析(PCA)法和Brovey變換法。這幾種融合算法理論比較成熟,并且在特定方面都有很好的融合效果。

資源截圖

代碼片段和文件信息

//---------------------------------------------------------------------------
#include?
#pragma?hdrstop

#include?“main.h“
#include?“setup.h“
//---------------------------------------------------------------------------
#pragma?package(smart_init)
#pragma?resource?“*.dfm“
TfmMain?*fmMain;
//---------------------------------------------------------------------------
__fastcall?TfmMain::TfmMain(TComponent*?Owner)
????????:?TForm(Owner)
{
?sb=new?Graphics::TBitmap();
?sf=new?Graphics::TBitmap();
?md=false;
}
//---------------------------------------------------------------------------
void?__fastcall?TfmMain::FormClose(Tobject?*Sender?TCloseAction?&Action)
{
?sb->Free();
?sf->Free();
}
//---------------------------------------------------------------------------
void?__fastcall?TfmMain::B1Click(Tobject?*Sender)
{
?if(!OpenPictureDialog1->Execute())?return;
?sb->LoadFromFile(OpenPictureDialog1->FileName);
?sb->PixelFormat=pf24bit;
?Posx=Posy=0;
?UpdatePic();
}
//---------------------------------------------------------------------------
void?__fastcall?TfmMain::B2Click(Tobject?*Sender)
{
?if(!OpenPictureDialog1->Execute())?return;
?sf->LoadFromFile(OpenPictureDialog1->FileName);
?sf->PixelFormat=pf24bit;
?Posx=Posy=0;
?UpdatePic();
}
//---------------------------------------------------------------------------
void?__fastcall?TfmMain::UpdatePic()
{

?byte?redbluegreen;
?byte?tr;
?byte?BW;
?int?xy;
?int?r;
?TMyColor?cc1c2;
?Graphics::TBitmap?*b=new?Graphics::TBitmap();
?b->PixelFormat=pf24bit;
?b->Width=sb->Width;
?b->Height=sb->Height;
?b->Canvas->Draw(00sb);

?red=fmSetup->TrackBar1->Position;
?green=fmSetup->TrackBar2->Position;
?blue=fmSetup->TrackBar3->Position;
?tr=fmSetup->TrackBar4->Position;
?BW=fmSetup->TrackBar5->Position;

?for(x=0;xWidth;x++)
???for(y=0;yHeight;y++)
????{
?????r=BW;
?????if(x?????if(y?????if((sf->Width-x)Width-x;
?????if((sf->Height-y)Height-y;
?????c=GetSourcePixel(x+Posxy+Posysb);
?????c1=GetSourcePixel(xysf);
?????c1.Blue=(c.Blue*tr+c1.Blue*(100-tr)*blue/255)/100;
?????c1.Green=(c.Green*tr+c1.Green*(100-tr)*green/255)/100;
?????c1.Red=(c.Red*tr+c1.Red*(100-tr)*red/255)/100;

?????c2.Blue=?(c.Blue*(BW-r)+r*c1.Blue)/BW?;
?????c2.Green=?(c.Green*(BW-r)+r*c1.Green)/BW?;
?????c2.Red=?(c.Red*(BW-r)+r*c1.Red)/BW?;
?????if((y+Posy)>=0?&&?(y+Posy)Height?&&?(x+Posx)>=0?&&?(x+Posx)Width)
???????((TMyColor?*)(b->ScanLine[y+Posy]))[x+Posx]=c2;
????}
?Image->Picture->Graphic=b;
?b->Free();
}
//---------------------------------------------------------------------------
TMyColor?__fastcall?TfmMain::GetSourcePixel(int?xint?yGraphics::TBitmap?*b)
{
?TMyColor?c;
?if(x<0?||?x>=sb->Width?||?y<0?||?y>=sb->Height)?return?c;
?return?((TMyColor?*)(b->ScanLine[y]))[x];
}
void?__fastcall?TfmMain::ImageMouseDown(Tobject?*Sender
??????TMouseButton?Button?TShiftState?Shift?int

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????4474??2000-02-19?10:42??tmp\main.cpp
?????文件????????1525??2000-02-19?10:42??tmp\main.dfm
?????文件????????2256??2000-02-19?10:42??tmp\main.h
?????文件????????5224??2000-02-19?10:44??tmp\pic.bpr
?????文件?????????811??2000-02-19?09:13??tmp\pic.cpp
?????文件??????196608??2000-02-19?10:48??tmp\pic.exe
?????文件?????????428??2000-02-19?10:44??tmp\pic.res
?????文件????????1906??2000-02-19?10:22??tmp\setup.cpp
?????文件????????2419??2000-02-19?10:35??tmp\setup.dfm
?????文件????????1614??2000-02-19?10:21??tmp\setup.h

評論

共有 條評論