next up previous [pdf]

Next: 1-D synthetic Up: Maurice: Tutorial Previous: Exercise: convert command-line arguments

Problem

horizon
horizon
Figure 6.
Depth slice from 3-D seismic (left) and output of edge detection (right).
[pdf] [png] [scons]

The left plot in Figure 6 shows a depth slice from a 3-D seismic volume[*]. You notice a channel structure and decide to extract it using and edge detection algorithm from the image processing literature (Canny, 1986). In a nutshell, Canny's edge detector picks areas of high gradient that seem to be aligned along an edge. The extracted edges are shown in the right plot of Figure 6. The initial result is not too clear, because it is affected by random fluctuations in seismic amplitudes. The goal of your research project is to achieve a better result in automatic channel extraction.

  1. Change directory to the project directory
    bash$ cd channel
    
  2. Run
    bash$ scons horizon.view
    
    in the Unix shell. A number of commands will appear in the shell followed by Figure 6 appearing on your screen.
  3. To understand the commands, examine the script that generated them by opening the SConstruct file in a text editor. Notice that, instead of Shell commands, the script contains rules.
  4. To better understand how rules translate into commands, run
    bash$ scons -c horizon.rsf
    
    The -c flag tells scons to remove the horizon.rsf file and all its dependencies.
  5. Next, run
    bash$ scons -n horizon.rsf
    
    The -n flag tells scons not to run the command but simply to display it on the screen. Identify the lines in the SConstruct file that generate the output you see on the screen.
  6. Run
    bash$ scons horizon.rsf
    
    Examine the file horizon.rsf both by opening it in a text editor and by running
    bash$ sfin horizon.rsf
    
    How many different MADAGASCAR modules were used to create this file? What are the file dimensions? Where is the actual data stored?
  7. Run
    bash$ scons smoothed.rsf
    
    Notice that the horizon.rsf file is not being rebuilt.
  8. What does the sfsmooth module do? Find it out by running
    bash$ sfsmooth
    
    without arguments. Has sfsmooth been used in any other MADAGASCAR examples?
  9. What other MADAGASCAR modules perform smoothing? To find out, run
    bash$ sfdoc -k smooth
    
  10. Notice that Figure 6 does not make a very good use of the color scale. To improve the scale, find the mean value of the data by running
    bash$ sfattr < horizon.rsf
    
    and insert it as a new value for the bias= parameter in the SConstruct file. Does smoothing by sfsmooth change the mean value?
  11. Save the SConstruct file and run
    bash$ scons view
    
    to view improved images. Notice that horizon.rsf and smoothed.rsf files are not being rebuilt. SCons is smart enough to know that only the part affected by your changes needs to be updated.

As shown in Figure 7, smoothing removes random amplitude fluctuations but at the same broadens the channel and thus makes the channel edge detection unreliable. In the next part of this tutorial, you will try to find a better solution by examining a simple one-dimensional synthetic example.

smoothed
smoothed
Figure 7.
Depth slice from Figure 6 after smoothing (left) and output of edge detection (right).
[pdf] [png] [scons]

from rsf.proj import *

# Download data
Fetch('horizon.asc','hall')

# Convert format
Flow('horizon','horizon.asc',
     '''
     echo in=$SOURCE data_format=ascii_float n1=3 n2=57036 | 
     dd form=native | window n1=1 f1=-1 |
     put
     n1=196 o1=33.139 d1=0.01 label1=y unit1=km
     n2=291 o2=35.031 d2=0.01 label2=x unit2=km 
     ''')

# Triangle smoothing
Flow('smoothed','horizon','smooth rect1=20 rect2=20')

# Display results
for horizon in ('horizon','smoothed'):
    # -- CHANGE BELOW --
    Plot(horizon,'grey color=j bias=0 yreverse=n wanttitle=n')
    edge = 'edge-'+horizon
    Flow(edge,horizon,'canny max=98 | dd type=float')
    Plot(edge,'grey allpos=y yreverse=n wanttitle=n')
    Result(horizon,[horizon,edge],'SideBySideIso')
    
End()


next up previous [pdf]

Next: 1-D synthetic Up: Maurice: Tutorial Previous: Exercise: convert command-line arguments

2015-01-08