Click or drag to resize
XDL

XDMBandEpipolar Class

XDMBandEpipolar클래스는 2장의 스테레오이미지로 부터 Epipolar이미지를 생성한다.
Inheritance Hierarchy

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

The XDMBandEpipolar type exposes the following members.

Constructors
  NameDescription
Public methodXDMBandEpipolar
XDMBandEpipolar클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Methods
  NameDescription
Public methodGetInputParam
Epipolar 생성을 위해 설정된 입력 변수를 얻는다.
Public methodGetRPCModelA
설정된 파라미터들로부터 계산된 Left 영상 RPC모델을 얻는다. 이 함수는 XDMBandEpipolarDEM에서 DEM을 생성하기 위해 사용된다.
Public methodGetRPCModelB
설정된 파라미터들로부터 계산된 Right 영상 얻는다. 이 함수는 XDMBandEpipolarDEM에서 DEM을 생성하기 위해 사용된다.
Public methodSetInputParam
Epipolar 생성을 위한 입력 변수들을 설정한다.
Top
Examples
한 쌍의 영상과 이에 대응하는 RPC 파일을 각각 로딩한 후 결과 영상과 함께 RPC 파일을 저장한다.
// IO initialize to load image file
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
    return;
}

// Left and right Image load 
String strFilePathLoad1 = "D:\\Sample\\RS_Sample\\Epipolar\\po_97258_pan_0010000.xdm";
String strFilePathLoad2 = "D:\\Sample\\RS_Sample\\Epipolar\\po_97258_pan_0000000.xdm";
XRSLoadFile xrsFileInput1 = RasterIO.LoadFile(strFilePathLoad1, out strError, false, eIOCreateXLDMode.All_NoMsg);
XRSLoadFile xrsFileInput2 = RasterIO.LoadFile(strFilePathLoad2, out strError, false, eIOCreateXLDMode.All_NoMsg);

// Load left and right rpc and make SensorModel
String strRPCPathLoad1 = "D:\\Sample\\RS_Sample\\Epipolar\\po_97258_pan_0010000.rpc";
String strRPCPathLoad2 = "D:\\Sample\\RS_Sample\\Epipolar\\po_97258_pan_0000000.rpc";
XRpc smL = new XRpc();
XRpc smR = new XRpc();
smL.LoadFromRPC(strRPCPathLoad1, eSensorRPCType.Ikonos, out strError);
smR.LoadFromRPC(strRPCPathLoad2, eSensorRPCType.Ikonos, out strError);

// Set left and right input param
XBandParamEpipolar InputParamL = new XBandParamEpipolar();
InputParamL.SrcBandL = xrsFileInput1.GetBandAt(0);
InputParamL.SrcBandR = xrsFileInput2.GetBandAt(0);
InputParamL.ResampleMethod = eResampleMethod.BiLinear;
InputParamL.SensorModelL = smL;
InputParamL.SensorModelR = smR;
InputParamL.HeightMin = -180;
InputParamL.HeightMax = 600;
InputParamL.LeftImageFlag = true;

XBandParamEpipolar InputParamR = new XBandParamEpipolar();
InputParamR.SrcBandL = xrsFileInput1.GetBandAt(0);
InputParamR.SrcBandR = xrsFileInput2.GetBandAt(0);
InputParamR.ResampleMethod = eResampleMethod.BiLinear;
InputParamR.SensorModelL = smL;
InputParamR.SensorModelR = smR;
InputParamR.HeightMin = -180;
InputParamR.HeightMax = 600;
InputParamR.LeftImageFlag = false;

// Create new process band and set input param
XDMBandEpipolar bandProcessL = new XDMBandEpipolar();
XDMBandEpipolar bandProcessR = new XDMBandEpipolar();
bandProcessL.SetInputParam(ref InputParamL);
bandProcessR.SetInputParam(ref InputParamR);

// Create XRSSaveFile to save realtime band(XDMBandXXXX)
XRSSaveFile fileSaveL = new XRSSaveFile();
XRSSaveFile fileSaveR = new XRSSaveFile();
XDMBand bandCastL = (XDMBand)bandProcessL;
XDMBand bandCastR = (XDMBand)bandProcessR;

fileSaveL.AddBand(ref bandCastL);
fileSaveR.AddBand(ref bandCastR);

// Save epipolar left file
XThread thd = null;
String strFilePathSaveL = "D:\\Sample\\Out_EpipolarLeft.xdm";
if (!RasterIO.Export(ref fileSaveL, strFilePathSaveL, "XDM", out strError, thd))
{
    return;
}

// Save left epipolar rpc
String strRPCPathSaveL = "D:\\Sample\\Out_EpipolarLeft.rpc";
XRpc rpcL = bandProcessL.GetRPCModelA();
rpcL.SaveRPC(strRPCPathSaveL);

// Save eipolar right file
String strFilePathSaveR = "D:\\Sample\\Out_EpipolarRight.xdm";
if (!RasterIO.Export(ref fileSaveR, strFilePathSaveR, "XDM", out strError, thd))
{
    return;
}

// Save right epipolar rpc
String strRPCPathSaveR = "D:\\Sample\\Out_EpipolarRight.rpc";
XRpc rpcR = bandProcessR.GetRPCModelB();
rpcR.SaveRPC(strRPCPathSaveR);
See Also