![]() | XImageMosaic Class |
Namespace: Pixoneer.NXDL.NRS
public class XImageMosaic : IDisposable
The XImageMosaic type exposes the following members.
Name | Description | |
---|---|---|
![]() | XImageMosaic | XImageMosaic 클래스의 기본 생성자로서, 내부 멤버 변수의 초기화를 수행한다. |
Name | Description | |
---|---|---|
![]() | AddImage | 모자이크할 영상 데이터를 XGrid 형태로 추가한다. |
![]() | Generate(XGrid) | 현재까지 추가된 영상 데이터로 모자이크 이미지를 생성한다. |
![]() | Generate(XGrid, Double) | 현재까지 추가된 영상 데이터로 모자이크 이미지를 생성한다. 기본적으로 특징점 매칭을 사용한다. |
![]() | Generate(XGrid, Double, Boolean) | 현재까지 추가된 영상 데이터로 모자이크 이미지를 생성한다. |
XRasterIO RasterIO = new XRasterIO(); String strError = ""; if (RasterIO.Initialize(out strError) == false) { return; } // Image load 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); // Makes 4 grid data from Grid data. 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); // Save output file XThread thd = null; String strFilePathSave = "D:\\Sample\\mosaic_sample\\Out_Mosaic.xdm"; if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd)) { return; }