13.07.2014 Views

single PDF file - Madagascar

single PDF file - Madagascar

single PDF file - Madagascar

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Madagascar</strong> Documentation Tutorial 27<br />

Figure 2: Depth slice from Figure 1 after smoothing (left) and output of edge detection<br />

(right). school2009/channel smoothed<br />

9 echo in=$SOURCE data format=a s c i i f l o a t n1=3 n2=57036 |<br />

10 dd form=n a t i v e | window n1=1 f 1=−1 |<br />

11 put<br />

12 n1=196 o1 =33.139 d1=0.01 l a b e l 1=y unit1=km<br />

13 n2=291 o2 =35.031 d2=0.01 l a b e l 2=x unit2=km<br />

14 ’ ’ ’ )<br />

15<br />

16 # Triangle smoothing<br />

17 Flow ( ’ smoothed ’ , ’ horizon ’ , ’ smooth r e c t 1 =20 r e c t 2 =20 ’ )<br />

18<br />

19 # Display r e s u l t s<br />

20 for horizon in ( ’ horizon ’ , ’ smoothed ’ ) :<br />

21 # −−− CHANGE BELOW −−−<br />

22 Plot ( horizon , ’ grey c o l o r=j b i a s=0 y r e v e r s e=n w a n t t i t l e=n ’ )<br />

23 edge = ’ edge−’+horizon<br />

24 Flow ( edge , horizon , ’ canny max=98 | dd type=f l o a t ’ )<br />

25 Plot ( edge , ’ grey a l l p o s=y y r e v e r s e=n w a n t t i t l e=n ’ )<br />

26 Result ( horizon , [ horizon , edge ] , ’ SideBySideIso ’ )<br />

27<br />

28 End ( )<br />

1-D SYNTHETIC<br />

To better understand the effect of smoothing, you decide to create a one-dimensional<br />

synthetic example shown in Figure 3(a). The synthetic contains both sharp edges and<br />

random noise. The output of conventional triangle smoothing is shown in Figure 3(b).<br />

We see an effect similar to the one in the real data example: random noise gets

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!