Click or drag to resize
XDL

XDMBandFeatureExt Class

설정한 입력값에 따라 영상에서 비슷하거나 동일한 특성을 가진 화소를 추출한다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NRSXDMBand
    Pixoneer.NXDL.NRSEXXDMBandFeatureExt

Namespace:  Pixoneer.NXDL.NRSEX
Assembly:  NXDLrsEx (in NXDLrsEx.dll) Version: 2.0.3.31
Syntax
C#
public class XDMBandFeatureExt : XDMBand

The XDMBandFeatureExt type exposes the following members.

Constructors
  NameDescription
Public methodXDMBandFeatureExt
XDMBandFeatureExt클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Methods
  NameDescription
Public methodCreateFeature
새 feature 를 생성하여 추가한다.
Public methodDilateFeature
Feature 영역을 넓힌다.
Public methodErodeFeature
Feature 영역을 erode 한다.
Public methodExpandFeature
Feature 영역을 확장 한다.
Public methodExtractFeatureFromSeedPixel
입력한 한 픽셀의 특성을 이용해서 feature 를 추출한다 .
Public methodExtractFeatureFromSeedPolygon
입력한 특정 영역의 특성을 이용해서 feature 를 추출한다 .
Public methodGetInputParam
화소 추출을 위한 입력 파라미터를 얻는다.
Public methodGetPolygon
Feature 영역 내 화소값 한 개당 XvcPolygon 으로 생성해서 arrPolygon 에 추가한다.
Public methodSetInputParam
화소 추출을 위한 입력 파라미터를 설정.
Public methodShrinkFeature
Feature 영역을 줄인다.
Top
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 strFilePath = @"E:\SampleImage\IKONOS_geo.xdm";
XRSLoadFile xrsFileSrc = rasterIO.LoadFile(strFilePath, out strError, false, eIOCreateXLDMode.All_NoMsg);

// Set input param
XBandParamFeatureExt paramFeatureExt = new XBandParamFeatureExt();
for (int i = 0; i < xrsFileSrc.NumBand; i++)
    paramFeatureExt.ArrBandList.Add(xrsFileSrc.GetBandAt(i));
paramFeatureExt.Search8 = false;
paramFeatureExt.Std_delta_expand = 0.5;
paramFeatureExt.Std_delta_shrink = 0.5;
paramFeatureExt.ErodeDilateDirection = (int)(XErodeDilate.Left | XErodeDilate.Right | XErodeDilate.Up | XErodeDilate.Down);
paramFeatureExt.Limit = true;
paramFeatureExt.MaxPixelCnt = 1000;

// Create New process band and set input param
XDMBandFeatureExt bandFeatureExt = new XDMBandFeatureExt();
bandFeatureExt.CreateFeature("Feature1", System.Drawing.Color.FromArgb(255, 255, 255, 0));
if (!bandFeatureExt.SetInputParam(ref paramFeatureExt))
{
    MessageBox.Show("fail to set params.!");
    return;
}

if (!bandFeatureExt.ExtractFeatureFromSeedPixel(0, 600, 600, null))
{
    MessageBox.Show("fail to extract feature from seedpixel.");
    return;
}

// create XRSSaveFile to save realtime band(XDMBandXXXX)
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandFeatureExt;
fileSave.AddBand(ref bandCast);

// Save output file
String strFilePathSave = @"E:\SampleImage\Result_FeatureExt.xdm";
if (rasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, null))
{
    MessageBox.Show("성공");
    return;
}
See Also