![]() |
XDMBand
|
public class XDMBandUnSuperClass : XDMBand
The XDMBandUnSuperClass type exposes the following members.
Name | Description | |
---|---|---|
![]() | XDMBandUnSuperClass | XDMBandUnSuperClass 클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다. |
Name | Description | |
---|---|---|
![]() | Clustering | 무감독 분류시 사전 분광 통계 정보를 계산한다. 입력 파라미터 설정 후 분광 통계 정보를 설정을 위해 반드시 호출해야 하는 함수이다. |
![]() | GetClusterDistance | Cluster Index와 Band Index에 해당하는 거리를 얻는다. |
![]() | GetClusterMean | Cluster Index와 Band Index에 해당하는 평균값을 얻는다. |
![]() | GetClusterPopulation | 입력 Cluster Index에 해당하는 Population값을 얻는다. |
![]() | GetClusterSum | Cluster Index와 Band Index에 해당하는 합계를 얻는다. |
![]() | GetClusterSum2 | Cluster Index와 Band Index에 해당하는 제곱합을 얻는다. |
![]() | GetClusterVariance | Cluster Index와 Band Index에 해당하는 분산값을 얻는다. |
![]() | GetInputParam | 무감독 분류 영상처리를 위한 파라미터를 얻는다. |
![]() | GetNumClusters | Clustering 후 군집 개수를 가져온다. |
![]() | SetInputParam | 무감독 분류 영상처리를 위한 입력 파라미터를 설정. |
// 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\\RS_Sample\\UnSuperClass\\etm.xdm"; XRSLoadFile xrsFileInput = RasterIO.LoadFile(strFilePathLoad, out strError, false, eIOCreateXLDMode.All_NoMsg); eUnSuperClassMethod Method; Method = eUnSuperClassMethod.Sequential; // Set input param XBandParamUnSuperClass InputParam = null; if (Method == eUnSuperClassMethod.Sequential) { InputParam = new XBandParamUnSuperClassSequential(); ((XBandParamUnSuperClassSequential)InputParam).PercentForMerge = 20; } else if (Method == eUnSuperClassMethod.KMeans) { InputParam = new XBandParamUnSuperClassKMeans(); ((XBandParamUnSuperClassKMeans)InputParam).MaxIteration = 10; ((XBandParamUnSuperClassKMeans)InputParam).ExitPercentOfChange = 0; } else if (Method == eUnSuperClassMethod.Isodata) { InputParam = new XBandParamUnSuperClassIsodata(); ((XBandParamUnSuperClassIsodata)InputParam).MaxIteration = 10; ((XBandParamUnSuperClassIsodata)InputParam).ExitPercentOfChange = 0; ((XBandParamUnSuperClassIsodata)InputParam).MaxStdDevCluster = 10; } else if (Method == eUnSuperClassMethod.Fuzzy) { InputParam = new XBandParamUnSuperClassFuzzy(); ((XBandParamUnSuperClassFuzzy)InputParam).FuzzyPrecision = 0.001; } // Common for (int i = 0; i < xrsFileInput.NumBand; i++) { InputParam.ArrBandList.Add(xrsFileInput.GetBandAt(i)); } InputParam.MaxNumberCluster = 5; InputParam.MaxRadiusCluster = 30; InputParam.MinDistanceCluster = 20; InputParam.MinNumPixelsInCluster = 100; InputParam.NullValue =0; InputParam.X1C = 0; InputParam.X2C = xrsFileInput.GetBandAt(0).XSize - 1; InputParam.Y1C = 0; InputParam.Y2C = xrsFileInput.GetBandAt(0).YSize - 1; InputParam.LevelC = xrsFileInput.GetBandAt(0).GetLevel(); // Create New process band and set input param XDMBandUnSuperClass bandProcess = new XDMBandUnSuperClass(); bandProcess.BandName = xrsFileInput.FileName; bandProcess.SetInputParam(ref InputParam); // Clustering if (!bandProcess.Clustering(null)) { MessageBox.Show("It could not execute clustering"); return ; } // create XRSSaveFile to save realtime band(XDMBandXXXX) // load another file to protect thread lock(it is stable and faster). XRSSaveFile fileSave = new XRSSaveFile(); XDMBand bandCast = (XDMBand)bandProcess; fileSave.AddBand(ref bandCast); // Save output file XThread thd = null; String strFilePathSave = "D:\\Sample\\Out_UnSuperClass.xdm"; if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd)) { return; }