|
XImageMosaic Class
|
XImageMosaic 클래스는 여러 장의 영상 데이터를 읽어 특징점을 찾아 이를 기반으로 모자이크 데이터를 생성하는 기능을 정의한다. 각 영상 데이터에는 센서 모델링을 적용하여 보다 정확하게 영상처리를 할 수 있다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NRSAssembly: NXDLrs (in NXDLrs.dll) Version: 2.0.3.38
Syntaxpublic class XImageMosaic : IDisposable
The XImageMosaic type exposes the following members.
Constructors | Name | Description |
---|
 | XImageMosaic | XImageMosaic 클래스의 기본 생성자로서, 내부 멤버 변수의 초기화를 수행한다. |
Top
Methods
ExampleXRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
return;
}
String strFilePathLoad1 = "D:\\Sample\\mosaic_sample\\img1.xdm";
String strFilePathLoad2 = "D:\\Sample\\mosaic_sample\\img2.xdm";
String strFilePathLoad3 = "D:\\Sample\\mosaic_sample\\img3.xdm";
String strFilePathLoad4 = "D:\\Sample\\mosaic_sample\\img4.xdm";
XRSLoadFile[] xrsFileInput = new XRSLoadFile[4];
xrsFileInput[0] = RasterIO.LoadFile(strFilePathLoad1, out strError, false, eIOCreateXLDMode.All_NoMsg);
xrsFileInput[1] = RasterIO.LoadFile(strFilePathLoad2, out strError, false, eIOCreateXLDMode.All_NoMsg);
xrsFileInput[2] = RasterIO.LoadFile(strFilePathLoad3, out strError, false, eIOCreateXLDMode.All_NoMsg);
xrsFileInput[3] = RasterIO.LoadFile(strFilePathLoad4, out strError, false, eIOCreateXLDMode.All_NoMsg);
XGrid[] gridData = new XGrid[4];
for (int i = 0; i < 4; i++)
{
gridData[i] = new XGrid();
xrsFileInput[i].GetBandAt(0).ReadSubset(ref gridData[i], 0, 0, xrsFileInput[i].GetBandAt(0).XSize - 1, 0, xrsFileInput[i].GetBandAt(0).YSize - 1);
}
XImageMosaic imgMosaic = new XImageMosaic();
for (int i=0; i < 4; i++) imgMosaic.AddImage(gridData[i], null);
XGrid gridMosaic = new XGrid();
if (!imgMosaic.Generate(ref gridMosaic)) return;
XBandParam2DMem param2DMem = new XBandParam2DMem();
param2DMem.GridData = gridMosaic;
XDMBand2DMem bandProcess = new XDMBand2DMem();
bandProcess.SetInputParam(ref param2DMem);
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandProcess;
fileSave.AddBand(ref bandCast);
XThread thd = null;
String strFilePathSave = "D:\\Sample\\mosaic_sample\\Out_Mosaic.xdm";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd))
{
return;
}
See Also