Doris应用大全

更新时间:2023-10-04 08:55:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Doris应用大全

FFTW的安装

FFTW是由MIT 的 Matteo Frigo和 Steven G. Johnson. 开发的,可用来进行快速傅立叶变换。目前最新版本:v3.0.1 相关网址:http://www.fftw.org/ 打开终端,进入FFTW路径,依次执行:

./configure --prefix=`pwd` --enable-float make

make install 完成安装。 1.1 Doris的安装

目前,Doris的最新版本为v3.17,下载地址:

http://enterprise.lr.tudelft.nl/doris/software/download.html

解压后进入src路径(cd /…/doris/src),依次执行:

./configure make

make install 完成安装。

1.2 SARtools和ENVISAT_TOOLS的安装 分别进入各自路径,执行:

make

make install

完成安装

1.3 getorb的安装

若linux的版本为fedora4,则需首先安装g77

利用getorb可以获得ERS/ENVISAT的精确轨道,Doris的 M_PORBITS 和S_PORBITS要调

用getorb 目前最新版本v2.3.0 相关网址:

http://www.deos.tudelft.nl/ers/precorbs/tools/getorb_pack.shtml 进入getorb路径,依次执行: make

make install 完成安装

1.4 snaphu的安装

Stanford开发的解缠工具,被在Doris中的UNWRAP调用,目前最新版本v1.4.2 相关网址: http://www-star.stanford.edu/sar_group/snaphu/ 进入snaphu的src路径,依次执行: make

make install 完成安装。 1.5 GMT的安装

2. 软件运行 2.1 设置环境变量

在fedora默认的bash下,设置如下环境变量: export PAGER=less export EDITOR=vi

export EDITOR=gedit /

为日后方便,可直接在../etc/bashrc中加入上述两行以永久性设置环境变量。

2.2 run

Doris为方便用户,可用run命令生成初始化文件。 2.2.1 在终端输入run –g 在当前路径下生成如下几个文件: Input.m_inital; input.s_intial; input.resample; input.coregistration; input.products; input.filter_unwrap; input.quicklook

正常时在终端返回以下信息: *--------------

[andy@localhost ~]$ run -g

run: ***INFO*** generation of inputfiles finished. run: ***INFO*** inputdir: Inputfiles run: ***INFO*** outputdir (stout): Outinfo run: ***INFO*** outputdir (matrices): Outdata run: ***INFO*** Using executable in path: doris run: ***INFO*** or (if -d option present): doris.debug run: ***TIP*** run -e1; run -s1

-------------------------* 2.2.2输入run –e1

调用gedit编辑Input.m_inital(主影像初始化文件)

Input.m_inital主要实现以下四步: 读取SLC文件―------―m_readfiles 数据剪裁及格式转化―――m_crop 过采样(可选)―――――m_ovs 确定精确轨道――――――m_porbits

在Input.m_inital中要给出SLC文件volume,leader、data file的路径以及Delft轨道数据文件的路径。

Input.m_inital文件中若干参数的设定 在图像剪裁选项卡中,需要注意:

# ------------------------------------------ # CROP (master)

# ------------------------------------------

?? ??

M_DBOW 1 5000 1 1000 // database output window 若要处理整幅影像时需要将上面的选项注释掉。

# ------------------------------------------ # OVERSAMPLE (master)

# ------------------------------------------

M_OVS_OUT Outdata/master_ovs.raw // 输出文件名称 M_OVS_OUT_FORMAT ci2 //过采样影像格式 ci2 | cr4. M_OVS_FACT_RNG 2 //距离向过采样率(可采用其他值) M_OVS_FACT_AZI 1 // 方位向过采样率(可采用其他值) M_OVS_KERNELSIZE 16 // 过采样所采用插值核的长度

Raffaele Nutricato曾将距离向采样率设为4来进行多时相分析(multi-temporal anylsys )效果不错。对于PS-Insar,两个方向都设为2比较合理――Bert Kamps

# ------------------------------------------ # PORBITS (master)

# ------------------------------------------

从DEOS获得的轨道数据为小写的时,需要改成大写。即将odr.***换成ODR.***否则getorb将无法读取(这跟系统有关)。

getorb提供了两种确定轨道的方法——三次自然样条插值和三次多项式插值。采用三次自然样条插值时在第一行纪录前最后一行纪录后至少有3个数据点;采用三次多项式插值时,时间间隔可取20-30秒,额外时间可取200秒。Doris默认样条插值。 c --for polyfit(3)--

c M_ORB_EXTRATIME 300 // Time before first line c M_ORB_INTERVAL 30 // 时间间隔

c M_ORB_DUMP 0.05 // dump to ascii file c --for spline--

M_ORB_EXTRATIME 6 // Time before first line M_ORB_INTERVAL 1 // 时间间隔。 2.2.3在终端输入run -s1

执行Input.m_inital中设定的步骤。 正常时在终端返回以下信息: *-----------------

[andy@localhost ~]$ run -s1

doris Inputfiles/input.m_initial >> Outinfo/stdout.input.m_initial PROGRESS: Interpretation inputoptionsfile finished. total cpu: 0 min 0 sec PROGRESS: Finished initialization PROGRESS: Start M_READFILES. PROGRESS: readvolume finished. PROGRESS: readleader finished.

PROGRESS: readdat (header info) finished. PROGRESS: Finished M_READFILES.

total cpu: 0 min 0.01 sec PROGRESS: Start M_PORBITS. (getorb: reading arclist

/usr/local/doris/delftorbits/ers2/dgme04/arclist)

(getorb: orbit file /usr/local/doris/delftorbits/ers2/dgme04/ODR.112) PROGRESS: getorb: program finished ok. PROGRESS: Finished M_PORBITS. total cpu: 0 min 0.01 sec

PROGRESS: Orbit: interpolation coefficients computed. PROGRESS: Start M_CROP.

PROGRESS: Start cropping slc data. PROGRESS: WRITESLC: 0% PROGRESS: WRITESLC: 10% PROGRESS: WRITESLC: 20% PROGRESS: WRITESLC: 30% PROGRESS: WRITESLC: 40% PROGRESS: WRITESLC: 50% PROGRESS: WRITESLC: 60% PROGRESS: WRITESLC: 70% PROGRESS: WRITESLC: 80% PROGRESS: WRITESLC: 90% PROGRESS: WRITESLC: 100% PROGRESS: Finished M_CROP. total cpu: 0 min 2.21 sec

PROGRESS: calling preview for cropped master PROGRESS: Start PREVIEW generation.

PROGRESS: SUNraster file created of: Outdata/master.raw (see also file: ./master_mag.ras.sh) PROGRESS: Start M_OVS.

PROGRESS: OVERSAMPLESLC: 0%

@(#)Doris software, $Revision: 3.11 $, $Author: kampes $ cpxfiddle: INFO: Number of output pixels: 500

PROGRESS: OVERSAMPLESLC: 10% PROGRESS: OVERSAMPLESLC: 20% PROGRESS: OVERSAMPLESLC: 30% PROGRESS: OVERSAMPLESLC: 40% PROGRESS: OVERSAMPLESLC: 50% PROGRESS: OVERSAMPLESLC: 60% PROGRESS: OVERSAMPLESLC: 70% PROGRESS: OVERSAMPLESLC: 80% PROGRESS: OVERSAMPLESLC: 90% PROGRESS: OVERSAMPLESLC: 100% PROGRESS: Finished M_OVS.

total cpu: 0 min 17.99 sec

PROGRESS: calling preview for oversampled master PROGRESS: Start PREVIEW generation.

PROGRESS: SUNraster file created of: Outdata/master_ovs.raw (see also file: ./master_ovs_mag.ras.sh) total cpu: 0 min 17.99 sec

...Any given program, when running, is obsolete. --- WARNING SUMMARY --- There were no messages.

Redirected output in file: Outinfo/stdout.input.m_initial view with: run -v1

NOTE: before run -s1, you can do run -ql to get a quicklook processing. which will run step 1 and 2 if not done already. ------------------* 2.2.4 输入run –e2

调用gedit编辑Input.s_inital(副影像初始化文件)

与run -e1同

2.2.5 输入run -s2

执行Input.s_inital中设定的步骤 与run -s1同 2.2.6 输入run -e3

调用gedit编辑Input.coregistration(匹配的初始化文件)

Input.coregistration主要实现以下四步: 基于轨道的粗匹配――――――――coarseorb 像素级匹配―――――――――――coarsecorr 主影像方位向滤波――――――――m_filtazi 副影像方位相滤波――――――――s_filtazi

距离向滤波―――――――――――filtrange(可选)

首先根据获取主副影像的轨道进行匹配(coarseorb,没有输入参数),精度30像素左右。然后进行像素级匹配(coarsecorr)有两种方法可供选择,一种是在空间域(space domain)进行的匹配(magspace)。要求窗口尺寸为奇数,设为偶数时会自动转化为奇数。这样做只是为了执行起来方便,因为窗口移动的最小尺寸为1个像素。另一种是在频率域进行的匹配(magfft)。我们知道,空间域的卷积运算与频率域的乘法运算是等价的,通过FFT转化到频率域进行相关性的计算,效率较高。Doris缺省方法为magfft

Input.coregistration中若干参数的设定:

# ------------------------------------------ # COARSE COREGISTRATION

# ------------------------------------------ CC_METHOD magfft //缺省方法 c CC_METHOD magspace //

CC_NWIN 21 // 窗口数量(至少为5) CC_WINSIZE 256 256 // 窗口尺寸

c CC_INITOFF 0 0 // 如果没有精确轨道数据,则启用该项设定为0 0 CC_INITOFF orbit // 利用基于轨道匹配的结果。

窗口数和窗口尺寸的设定,没有什么规律,按默认的也可以,但对于所处理的影像而言,往往不是最佳的。

注意:这一步完成后,查看一下logfile,如果初始偏移量与估计值的差异超过1(对ERS-1/2而言,1是正常的)则需要将窗口尺寸增大。

# ------------------------------------------ # AZIMUTH FILTERING

# ------------------------------------------

对主影像进行方位向滤波,通过滤波主副影像不相重叠的部分将被滤掉。在SAR处理过程中如果主副影像采用的多普勒质心频率不相同则会产生不相重叠的部分。本步最好在粗匹配和精匹配之间进行。这样粗匹配得到的方位向的偏移量可用来确定多普勒质心频率的多项式,并有助于精匹配获得较好的结果。

c AF_METHOD //

AF_BLOCKSIZE 1024 // fftlength each column Length of

fft per buffer in azimuth direction. In general, the larger the better.

AF_OVERLAP 64 // hbs Half of the overlap between consecutive bufferes in azimuth direction. Partially the same data is used to estimate the spectrum, which might have certain advantages. However it has not been studied yet if taking an overlap is requird. Setting this card to 0 is fastest.

AF_HAMMING 0.75 // The weighting of the spectrum in azimuth direction. The filtered output spectrum is first de-weighted with the specified hamming flter, then re-weighted with a (newly centered) one. AF_OUT_MASTER Outdata/master.af AF_OUT_SLAVE Outdata/slave.af

AF_OUT_FORMAT cr4 //

以上参数按默认值即可

# ------------------------------------------ # RANGE FILTERING (master&slave)

# ------------------------------------------

RF_METHOD porbits // based on orbit geometry RF_SLOPE 0.0 // [deg] and terrain slope RF_FFTLENGTH 1024 // power of 2 RF_HAMMING 0.75 // 'alpha' RF_OUT_MASTER Outdata/master.rf_orb RF_OUT_SLAVE Outdata/slave.rf_orb RF_OUT_FORMAT cr4 // 以上参数按默认值即可

#------------------------------------------ FINE COREGISTRATION

# ------------------------------------------

该步主要在亚像素精度的水平上计算主副影像对应点位的偏移矢量。首先在分布于整幅影像中的

大量窗口中,对于给定窗口,在整幅影像范围内通过计算能量影像(magnitude images)的相干系数来估计偏移量(精度约1个像素),其次,对于上一步所计算的最大相关系数的窗口,进行过采样,以在亚像素的水平上确定相干系数最大值。重复进行上述步骤。 %%%%%%%%

下面举个例子说明过采样(距离向过采样)的实现方法:

影像是按行读入的,过采样时也按行进行。(定义:line对应于方位向,慢时间;pixel对应于距离向,快时间)

给定输入信号××××,及过采样率(假设取为3)

首先,生成一个用‘○’填充的与输入信号结构一致的复本:×○○×○○×○○× 然后,将其与插值核(sinc函数)作卷积,生成输出信号:×++×++×++×,其中+表示新的采样。

%%%%%%%%%%%%%%%%%%%%%%

c FC_METHOD magfft // fast

FC_METHOD oversample // best: oversample complex data c FC_METHOD magspace // same as magfft

FC_NWIN 601 // number of smaller windows c FC_IN_POS highcorr.pos // filename with window positions FC_WINSIZE 64 64 // size of windows FC_ACC 8 8 // search window, 2^n FC_INITOFF coarsecorr // use result of coarse FC_OSFACTOR 32 // oversampling factor FC_PLOT 0.2 NOBG // GMT plot with magnitude background

c // c // STOP

窗口数和窗口尺寸当采用默认值效果不理想时,应根据数据的具体情况进行调整,可以考虑将窗口数增大一倍(个人经验);窗口尺寸建议使用64×64

FC_ACC为最大相干系数的搜索精度,建议为8,8,这样搜索区域就为-8到8,采用FFT方法时必须为2的幂。

FC_OSFACTOR为采样因子(采样率),要想达到1/10之一的匹配精度,建议取为32 FC_PLOT为GMT的绘图参数,将绘制大于所给参数的偏移矢量。 2.2.6 输入run -s3

将执行Input.coregistration中设定的步骤。 正常时,在终端返回以下信息:

[root@localhost doris_tailand]# run -s3 doris

PROGRESS: Interpretation inputoptionsfile finished. total cpu: 0 min 0 sec PROGRESS: Finished initialization

PROGRESS: Orbit: interpolation coefficients computed. PROGRESS: Orbit: interpolation coefficients computed.

Inputfiles/input.coregistration

>>

Outinfo/stdout.input.coregistration

PROGRESS: Start COARSE_ORB.

PROGRESS: Coarse precise orbits coregistration finished. PROGRESS: Finished COARSE_ORB. total cpu: 0 min 0.04 sec PROGRESS: Start COARSE_CORR. PROGRESS: COARSE_CORR: 0% PROGRESS: COARSE_CORR: 10% PROGRESS: COARSE_CORR: 20% PROGRESS: COARSE_CORR: 30% PROGRESS: COARSE_CORR: 40% PROGRESS: COARSE_CORR: 50% PROGRESS: COARSE_CORR: 60% PROGRESS: COARSE_CORR: 70% PROGRESS: COARSE_CORR: 80% PROGRESS: COARSE_CORR: 90% PROGRESS: COARSE_CORR: 100%

PROGRESS: Coarse coregistration based on correlation finished. PROGRESS: Finished COARSE_CORR. total cpu: 0 min 29.35 sec PROGRESS: Start FILTAZI (master). PROGRESS: FILTAZI: 0% PROGRESS: FILTAZI: 10% PROGRESS: FILTAZI: 20% PROGRESS: FILTAZI: 30% PROGRESS: FILTAZI: 40% PROGRESS: FILTAZI: 50% PROGRESS: FILTAZI: 60% PROGRESS: FILTAZI: 70% PROGRESS: FILTAZI: 80% PROGRESS: FILTAZI: 90%

PROGRESS: Finished FILTAZI for master. total cpu: 2 min 18.9 sec PROGRESS: Start FILTAZI (slave). PROGRESS: FILTAZI: 0% PROGRESS: FILTAZI: 10% PROGRESS: FILTAZI: 20% PROGRESS: FILTAZI: 30% PROGRESS: FILTAZI: 40% PROGRESS: FILTAZI: 50% PROGRESS: FILTAZI: 60% PROGRESS: FILTAZI: 70% PROGRESS: FILTAZI: 80% PROGRESS: FILTAZI: 90%

PROGRESS: Finished FILTAZI slave.

total cpu: 4 min 4.84999 sec PROGRESS: Start FILTRANGE (porbits). PROGRESS: filtrange: 0% PROGRESS: Finished FILTRANGE. total cpu: 6 min 57.8 sec PROGRESS: Start FINE. PROGRESS: FINE: 0% PROGRESS: FINE: 10% PROGRESS: FINE: 20% PROGRESS: FINE: 30% PROGRESS: FINE: 40% PROGRESS: FINE: 50% PROGRESS: FINE: 60% PROGRESS: FINE: 70% PROGRESS: FINE: 80% PROGRESS: FINE: 90% PROGRESS: FINE: 100%

PROGRESS: Fine coregistration finished. PROGRESS: Finished FINE. total cpu: 10 min 9 sec total cpu: 10 min 9.02002 sec

...% \ Unmatched \

--- WARNING SUMMARY --- There were no messages.

2.2.7 输入run -e4

调用gedit编辑input.resample(重采样的初始化文件)

input.resample主要完成以下三个步骤: coregpm―――――――计算匹配参数 resample―――――――副影像重采样 filtrange――――――主副影像距离向滤波

# ------------------------------------------ # COREGISTRATION PARAMETERS MODELING # ------------------------------------------

该步主要根据步骤FINE估计的偏移量,利用最小二乘方法计算匹配模型(该模型应当具有亚像素级的精度)。可以事先对相干系数设一个阈值来滤除一些数据。计算之后,估计模型和和实际偏移量之间的残差将被绘制。由于干涉图对主副影像之间的匹配误差十分敏感,这一步非常关键。需要不断地迭代以获得最佳的变换模型。Doris采用一个CPM_MAXITER选项来设定自动迭代

的次数。

CPM_THRESHOLD 0.4 // higher threshold->less windows CPM_DEGREE 2 // 2d-polynomial c CPM_WEIGHT linear // or [none] c CPM_WEIGHT quadratic // or [none]

CPM_WEIGHT bamler // paper R.Bamler, IGARSS 2000/2004 CPM_MAXITER 20 // automated removal, max 20 iterations

c CPM_K_ALPHA 1.97 // automated removal crit. value CPM_PLOT NOBG // plot w/o magnitude background c CPM_DUMP OFF // no creation of files

CPM_THRESHOLD为相干系数的阈值,这一选项决定了有多少数据可以用于估计多项式的系数。该参数的设定取决于FINE中所采用窗口的大小。若采用的为64×64的窗口,设为0.2即可。当然最好还是自己试验若干数值,以获得理想的结果。 CPM_DEGREE多项式阶数,建议采用2

CPM_WEIGHT最小二乘的定权方法,建议选bamler方法

CPM_MAXITER迭代次数选项。如果在FINE中定义了600个窗口,则20次即可。 其它参数可以采用默认值。

# ------------------------------------------ # RESAMPLING SLAVE

# ------------------------------------------

根据主影像格网和COREGPM步骤中得到的变换模型对副影像重采样(重采样的过程就是利用插值核在空间域重建副影像原始信号的过程)。 该环节非常耗时

为了评价重采样的质量,可以将采样后的副影像与主影像再匹配。这时偏移矢量应基本为零。Doris提供了大量的插值核供选择,按缺省设置即可。 c --- Interpolation Kernel ---

c RS_METHOD tri // linear

c RS_METHOD nearest // nearest neighbour c RS_METHOD cc4p // cubic convolution c RS_METHOD cc6p // good choice; tested c RS_METHOD ts6p // truncated sinc c RS_METHOD ts8p // truncated sinc c RS_METHOD ts16p // slower but better

c RS_METHOD knab6p // better than cc6 (theory) c RS_METHOD knab8p // KNAB window c RS_METHOD knab10p // KNAB window c RS_METHOD knab16p // KNAB window c RS_METHOD knab4p // KNAB window

RS_METHOD rc6p // best choice (theory 0.9999)

本文来源:https://www.bwwdw.com/article/4cad.html

Top