Click or drag to resize
XDL

XDMBandChangeDetectSig Class

XDMBandChangeDetectSig는 화소값 자체를 ID로 인식하여 2장의 영상으로부터 동일한 영역에서 ID 변화를 통해 변화 탐지를 수행한다. 토지피복 분류후 동일한 영역에 대해 변화도를 조사할때 사용한다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NRSXDMBand
    Pixoneer.NXDL.NRSXDMBandChangeDetectSig

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

The XDMBandChangeDetectSig type exposes the following members.

Constructors
  NameDescription
Public methodXDMBandChangeDetectSig
XDMBandChangeDetectSig 클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Methods
  NameDescription
Public methodCalcChangeStatistics
특정영역에 대한 통계값을 설정하기 위해 변화전과 변화후의 ID를 대상으로 계산을 수행한다.
Public methodGetChangeStatistics
통계치를 계산한 후(CalcChangeStatistics 함수를 이용) 변경전과 변경후의 화소의 변경 자료를 얻는다.
Public methodGetInputParam
this객체에 설정된 입력 변수를 얻는다.
Public methodSetInputParam
2장의 Signature 영상(XGIS Band)에 대한 변화탐지를 수행하기 위한 파라미터를 정의한 XBandParamChangeDetectSig객체를 설정한다.
Top
Remarks

Examples
This is example C#:
IO initialize to load image file
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
    return;
}

// Image load
String strFilePathLoad1 = "D:\\Sample\\RS_Sample\\ChangeDetectSig\\80s36710.xdm";
String strFilePathLoad2 = "D:\\Sample\\RS_Sample\\ChangeDetectSig\\90s36710.xdm";
XRSLoadFile xrsFileInput1 = RasterIO.LoadFile(strFilePathLoad1, out strError, false, eIOCreateXLDMode.All_NoMsg);
XRSLoadFile xrsFileInput2 = RasterIO.LoadFile(strFilePathLoad2, out strError, false, eIOCreateXLDMode.All_NoMsg);

// Set input param
XBandParamChangeDetectSig InputParam = new XBandParamChangeDetectSig();
InputParam.SrcBand1 = xrsFileInput1.GetBandAt(0);
InputParam.SrcBand2 = xrsFileInput2.GetBandAt(0);
InputParam.ArrChangeItem.Add(new XBandParamChangeDetectSig_ChangeItem(4, 1, Color.Red));
InputParam.ArrChangeItem.Add(new XBandParamChangeDetectSig_ChangeItem(4, 2, Color.Green));
InputParam.ArrChangeItem.Add(new XBandParamChangeDetectSig_ChangeItem(4, 3, Color.Blue));
InputParam.ArrChangeItem.Add(new XBandParamChangeDetectSig_ChangeItem(4, 4, Color.Cyan));
InputParam.ArrChangeItem.Add(new XBandParamChangeDetectSig_ChangeItem(4, 5, Color.DarkGray));


// Create New process band and set input param
XDMBandChangeDetectSig bandProcess = new XDMBandChangeDetectSig();
if (!bandProcess.SetInputParam(ref InputParam))
{
    return;
}

bandProcess.CalcChangeStatistics(0, bandProcess.XSize, 0, bandProcess.YSize, null);

XDMBand band1 = xrsFileInput1.GetBandAt(0);
XDMBand band2 = xrsFileInput2.GetBandAt(0);
Console.WriteLine("\nStatistics========");
for (ushort j = 0; j < band1.GetNumOfGIS(); j++)
{
    Console.Write(band1.GetGISAt(j).ID.ToString() + ", ");
}
Console.Write("\n");

for (ushort i = 0; i < band1.GetNumOfGIS(); i++)
{
    Console.Write(band1.GetGISAt(i).ID.ToString() + " : ");
    for (ushort j = 0; j < band2.GetNumOfGIS(); j++)
    {
        ushort nFromID = (ushort)band1.GetGISAt(i).ID;
        ushort nToID = (ushort)band2.GetGISAt(j).ID;

        long pixelNum = bandProcess.GetChangeStatistics(nFromID, nToID);
        Console.Write(pixelNum.ToString() + ", ");
    }
    Console.Write("\n");
}

// Display to MapView in realtime

// create XRSSaveFile to save realtime band(XDMBandXXXX)
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandProcess;

fileSave.AddBand(ref bandCast);

// Save output file
XThread thd = null;
String strFilePathSave = "D:\\Sample\\ChangeDetectSig.xdm";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd))
{
    return;
}
See Also