|
XDMBandFeatureExt Class
|
설정한 입력값에 따라 영상에서 비슷하거나 동일한 특성을 가진 화소를 추출한다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NRSEXAssembly: NXDLrsEx (in NXDLrsEx.dll) Version: 2.0.3.38
Syntaxpublic class XDMBandFeatureExt : XDMBand
The XDMBandFeatureExt type exposes the following members.
Constructors
Methods
Example
This is example C# : 화소 추출 예제
XRasterIO rasterIO = new XRasterIO();
String strError = "";
if (rasterIO.Initialize(out strError) == false)
{
return;
}
string strFilePath = @"E:\SampleImage\IKONOS_geo.xdm";
XRSLoadFile xrsFileSrc = rasterIO.LoadFile(strFilePath, out strError, false, eIOCreateXLDMode.All_NoMsg);
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;
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;
}
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandFeatureExt;
fileSave.AddBand(ref bandCast);
String strFilePathSave = @"E:\SampleImage\Result_FeatureExt.xdm";
if (rasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, null))
{
MessageBox.Show("성공");
return;
}
See Also