Click or drag to resize
XDL

XDMBandHistogramMatching Class

XDMBandHistogramMatching 클래스는 히스토그램 매칭을 통해 영상의 색상을 조정한다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NRSXDMBand
    Pixoneer.NXDL.NRSXDMBandHistogramMatching

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

The XDMBandHistogramMatching type exposes the following members.

Constructors
 NameDescription
Public methodXDMBandHistogramMatching XDMBandHistogramMatching클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Methods
 NameDescription
Public methodGetInputParam 영상히스토그램매칭을 위한 파라미터를 얻는다.
Public methodSetInputParam 영상히스토그램매칭을 위한 입력 파라미터를 설정한다.
Top
Example
XDMBandHistogramMatching를 사용하여 영상의 색상을 조절하는 예제.
C#
// IO initialize to load image file
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
    return;
}

// Image load
String strFilePathLoad = @"d:\Data\ColorBalance\color\A.xdm";

XRSLoadFile xrsFileInput = RasterIO.LoadFile(strFilePathLoad, out strError, false, eIOCreateXLDMode.All_NoMsg);
if (xrsFileInput == null) return;

String strFilePathLoadRef = @"d:\Data\ColorBalance\color\B.xdm";

XRSLoadFile xrsFileInputRef = RasterIO.LoadFile(strFilePathLoadRef, out strError, false, eIOCreateXLDMode.All_NoMsg);
if (xrsFileInputRef == null) return;

XRSSaveFile fileSave = new XRSSaveFile();

for (int i = 0; i < xrsFileInput.NumBand; i++)
{
    // Set input param
    XBandParamHM InputParam = new XBandParamHM();
    InputParam.SrcBand = xrsFileInput.GetBandAt(i);
    InputParam.RefBand = xrsFileInputRef.GetBandAt(i);
    InputParam.MinOut = InputParam.RefBand.BandMin;
    InputParam.MaxOut = InputParam.RefBand.BandMax;
    // Create New process band and set input param
    XDMBandHistogramMatching bandProcess = new XDMBandHistogramMatching();
    if (!bandProcess.SetInputParam(ref InputParam))
    {
        return;
    }

    XDMBand bandCast = (XDMBand)bandProcess;

    fileSave.AddBand(ref bandCast);
}

XThread thd1 = null;
String strFilePathSave1 = @"d:\Data\ColorBalance\color\A_out.xdm";
bool resInput = RasterIO.Export(ref fileSave, strFilePathSave1, "xdm", out strError, thd1);
See Also