|
XDMBandGeoCorrect Class
|
XDMBandGeoCorrect클래스는 입력 영상과 3개 이상의 GCP을 이용해 기하학적 보정을 수행한다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NRSAssembly: NXDLrs (in NXDLrs.dll) Version: 2.0.3.38
Syntaxpublic class XDMBandGeoCorrect : XDMBand
The XDMBandGeoCorrect type exposes the following members.
Constructors
Methods
Remarks
Satellite images and aerial photographs have contains geometric distortions due to the elevation of the satellite or aerial sensor,
position, speed, earth curvature, and atmosphere reflection. Distortions are classified as either systematic or non-systematic.
Systematic distortions include scan skew, mirror-scan velocity, platform velocity, panoramic distortion, earth rotation, etc.
Non-systematic distortion is the effect from the altitude of the sensor and an irregular change of the position.
Systematic distortion can be corrected with the internal sensor of the satellite and with orbital information.
Non-systematic distortion requires sufficient GCPs for correction.
In geometric correction, the ground control point is defined as the corresponding point between the image coordinate system and
the geographic coordinate system. Accurate selection and a sufficient number of GCPs are required for geometric correction.
The selection of a GCP is the process of setting the image coordinates (of a pixel) and the geographic coordinates of the corresponding point.
Example
로딩한 영상과 위경도 좌표의 GCP 4개를 입력으로 하여 affine식으로 기하학적 보정을 수행하고, 영상재배열 방법으로 bilinear를 사용한다.
input param의 PixelSizeX, PixelSizeY 단위는 GCP 좌표계와 동일하다. 출력 영상은 GCP 좌표계와 동일한 좌표계를 갖는다.
using Pixoneer.NXDL;
using Pixoneer.NXDL.NRS;
using Pixoneer.NXDL.NIO;
using Pixoneer.NXDL.NCC;
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
return;
}
String strFilePathLoad = "D:\\Sample\\IKONOS.xdm";
XRSLoadFile xrsFileInput = RasterIO.LoadFile(strFilePathLoad, out strError, false, eIOCreateXLDMode.All_NoMsg);
XGCPSets gcpset = new XGCPSets();
XGCP gcp;
gcp = new XGCP();
gcp.ID = 0; gcp.imgCoord.x = 0; gcp.imgCoord.y = 0; gcp.refCoord.x = 127.35982299; gcp.refCoord.y = 36.38847486; gcp.Used = true;
gcpset.AddGCP(ref gcp);
gcp = new XGCP();
gcp.ID = 1; gcp.imgCoord.x = 2034.0; gcp.imgCoord.y = 0; gcp.refCoord.x = 127.38211805; gcp.refCoord.y = 36.38847486; gcp.Used = true;
gcpset.AddGCP(ref gcp);
gcp = new XGCP();
gcp.ID = 2; gcp.imgCoord.x = 2034.0; gcp.imgCoord.y = 2041.0; gcp.refCoord.x = 127.38211805; gcp.refCoord.y = 36.36976365; gcp.Used = true;
gcpset.AddGCP(ref gcp);
gcp = new XGCP();
gcp.ID = 3; gcp.imgCoord.x = 0.0; gcp.imgCoord.y = 2041.0; gcp.refCoord.x = 127.35982299; gcp.refCoord.y = 36.36976365; gcp.Used = true;
gcpset.AddGCP(ref gcp);
gcpset.SR = new XSpatialReference();
gcpset.SR.importFromEPSG(4326);
XBandParamGeoCorrect InputParam = new XBandParamGeoCorrect();
InputParam.SrcBand = xrsFileInput.GetBandAt(0);
InputParam.ResampleMethod = eResampleMethod.BiLinear;
InputParam.WarpMethod = eWarpMethod.Affine;
InputParam.PixelSizeX = 0.000100;
InputParam.PixelSizeY = 0.000100;
InputParam.GcpSets = gcpset;
XDMBandGeoCorrect bandProcess = new XDMBandGeoCorrect();
if (!bandProcess.SetInputParam(ref InputParam))
{
return;
}
XRSLoadFile fileLoad = RasterIO.LoadFile(strFilePathLoad, out strError, false, eIOCreateXLDMode.All_NoMsg);
XRSSaveFile fileSave = new XRSSaveFile();
for (int i = 0; i < fileLoad.NumBand; i++)
{
XDMBand bandRaw = fileLoad.GetBandAt(i);
XBandParamGeoCorrect param = new XBandParamGeoCorrect(ref InputParam);
param.SrcBand = bandRaw;
XDMBandGeoCorrect bandTmp = new XDMBandGeoCorrect();
bandTmp.BandName = bandRaw.BandName;
bandTmp.SetInputParam(ref param);
XDMBand bandCast = (XDMBand)bandTmp;
fileSave.AddBand(ref bandCast);
}
XThread thd = null;
String strFilePathSave = "D:\\Sample\\Out_GeoCorrect.xdm";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd))
{
return;
}
See Also