Click or drag to resize
XDL

XDMBandEnhance Class

XDMBandEnhance 클래스는 다양한 매개변수값을 적용하여 영상을 향상한다. XDMComposite를 통한 영상향상과 동일한 결과를 얻을 수 있다. 기본적으로 영상 향상 결과는 1 byte(0~255)이다.
Inheritance Hierarchy

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

The XDMBandEnhance type exposes the following members.

Constructors
  NameDescription
Public methodXDMBandEnhance
XDMBandEnhance클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Methods
  NameDescription
Public methodGetInputParam
영상향상을 위한 파라미터를 얻는다.
Public methodSetInputParam
영상향상을 위한 입력 파라미터를 설정한다.
Top
Examples
동일한 영상 밴드에 각각 cutting type과 stretch type을 다르게 적용한 XDMBandEnhance 밴드를 생성하여 TIF 파일로 저장하는 예제이다.
using Pixoneer.NXDL;
using Pixoneer.NXDL.NRS;
using Pixoneer.NXDL.NIO;

// IO initialize to load image file
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
    return;
}
// Image load
String strFilePathLoad = "D:\\Sample\\IKONOS.xdm";
XRSLoadFile xrsFileInput = RasterIO.LoadFile(strFilePathLoad, out strError, false, eIOCreateXLDMode.All_NoMsg);

// Set input param 
XBandParamEnhance InputParam0 = new XBandParamEnhance();
// CutType : 영상의 최대최소값을 cutting 값의 최대최소값으로 사용, 히스토그램 스트레칭 방법 : Linear
InputParam0.SrcBand = xrsFileInput.GetBandAt(0);
InputParam0.CutType = eCompCutType.Minmax;
InputParam0.StretchType = eCompStretchType.Linear;

XBandParamEnhance InputParam1 = new XBandParamEnhance();
// CutType : 영상의 gaussian 95% 분포를 기준으로 계산한 최대최소값을 cutting 값의 최대최소값으로 사용, 히스토그램 스트레칭 방법 : Linear
InputParam1.SrcBand = xrsFileInput.GetBandAt(0);
InputParam1.CutType = eCompCutType.Ct95;
InputParam1.StretchType = eCompStretchType.Linear;

XBandParamEnhance InputParam2 = new XBandParamEnhance();
// CutType : 영상의 gaussian 98% 분포를 기준으로 계산한 최대최소값을 cutting 값의 최대최소값으로 사용, 히스토그램 스트레칭 방법 : Linear
InputParam2.SrcBand = xrsFileInput.GetBandAt(0);
InputParam2.CutType = eCompCutType.Ct98;
InputParam2.StretchType = eCompStretchType.Linear;

XBandParamEnhance InputParam3 = new XBandParamEnhance();
// CutType : 영상의 gaussian 95% 분포를 기준으로 계산한 최대최소값을 cutting 값의 최대최소값으로 사용, 히스토그램 스트레칭 방법 : Histogram Equalize
InputParam3.SrcBand = xrsFileInput.GetBandAt(0);
InputParam3.CutType = eCompCutType.Ct95;
InputParam3.StretchType = eCompStretchType.Histequal;

XBandParamEnhance InputParam4 = new XBandParamEnhance();
// CutType : 영상의 gaussian 95% 분포를 기준으로 계산한 최대최소값을 cutting 값의 최대최소값으로 사용, 히스토그램 스트레칭 방법 : Gaussian
InputParam4.SrcBand = xrsFileInput.GetBandAt(0);
InputParam4.CutType = eCompCutType.Ct95;
InputParam4.StretchType = eCompStretchType.Gaussian;

XRSSaveFile fileSave = new XRSSaveFile();

// Create New process band and set input param
XDMBandEnhance bandProcess0 = new XDMBandEnhance();
bandProcess0.BandName = "Minmax-Linear";
bandProcess0.SetInputParam(ref InputParam0);

XDMBandEnhance bandProcess1 = new XDMBandEnhance();
bandProcess1.BandName = "Ct95-Linear";
bandProcess1.SetInputParam(ref InputParam1);

XDMBandEnhance bandProcess2 = new XDMBandEnhance();
bandProcess2.BandName = "Ct98-Linear";
bandProcess2.SetInputParam(ref InputParam2);

XDMBandEnhance bandProcess3 = new XDMBandEnhance();
bandProcess3.BandName = "Ct95-Histequal";
bandProcess3.SetInputParam(ref InputParam3);

XDMBandEnhance bandProcess4 = new XDMBandEnhance();
bandProcess4.BandName = "Ct95-Gaussian";
bandProcess4.SetInputParam(ref InputParam4);

XDMBand bandCast = (XDMBand)bandProcess0;
fileSave.AddBand(ref bandCast);

bandCast = (XDMBand)bandProcess1;
fileSave.AddBand(ref bandCast);

bandCast = (XDMBand)bandProcess2;
fileSave.AddBand(ref bandCast);

bandCast = (XDMBand)bandProcess3;
fileSave.AddBand(ref bandCast);

bandCast = (XDMBand)bandProcess4;
fileSave.AddBand(ref bandCast);

// Save output file
XThread thd = null;
String strFilePathSave = "D:\\Sample\\Out_ikonos_enhance.tif";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "GTiff", eIOCreateXLDMode.All_NoMsg, out strError, thd))
{
    return;
}

///
///
///
See Also