Click or drag to resize
XDL

XImageMosaic Class

XImageMosaic 클래스는 여러 장의 영상 데이터를 읽어 특징점을 찾아 이를 기반으로 모자이크 데이터를 생성하는 기능을 정의한다. 각 영상 데이터에는 센서 모델링을 적용하여 보다 정확하게 영상처리를 할 수 있다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NRSXImageMosaic

Namespace:  Pixoneer.NXDL.NRS
Assembly:  NXDLrs (in NXDLrs.dll) Version: 1.2.817.72
Syntax
C#
public class XImageMosaic : IDisposable

The XImageMosaic type exposes the following members.

Constructors
  NameDescription
Public methodXImageMosaic
XImageMosaic 클래스의 기본 생성자로서, 내부 멤버 변수의 초기화를 수행한다.
Top
Methods
  NameDescription
Public methodAddImage
모자이크할 영상 데이터를 XGrid 형태로 추가한다.
Public methodGenerate(XGrid)
현재까지 추가된 영상 데이터로 모자이크 이미지를 생성한다.
Public methodGenerate(XGrid, Double)
현재까지 추가된 영상 데이터로 모자이크 이미지를 생성한다. 기본적으로 특징점 매칭을 사용한다.
Public methodGenerate(XGrid, Double, Boolean)
현재까지 추가된 영상 데이터로 모자이크 이미지를 생성한다.
Top
Examples
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;
}
See Also