Skip to content

Latest commit

 

History

History

L07_case-study_image-filter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
Image Filter Tutorial Application
=============================================================================

This directory contains:
 - example implementation of Sobel and Gauss image filters
 - sample image data as input in testimages.tar.bz2:
     - sail.fibre (medium, 514x599 pixels)
     - sail.dat (medium, same as above but in simple matrix format)
     - sail.fibre (medium, same as above but in PNG format)
     - saclogo.fibre (small, 130x70 pixels)
     - saclogo.dat (same as above but in simple matrix format)
     - saclogo.png (same as above but in PNG format)

To compile this program, run 

  sac2c -D<filter> -D<clock> -D<format> image_filter.sac -o image_filter


See below for description of available options:

<filter>: 
-----------------------------------------------------------------------------
  <filter> may be one of the following: SOBEL, GAUSS, GAUSS25. 

  If no filter is given a Sobel filter will be used.
  
<clock>:
-----------------------------------------------------------------------------
  <clock> may be one of the following: RTCLOCK, SIMPLECLOCK

  If no clock is specified, RTCLOCK will be used.

  RTCLOCK may not be available on all systems. If you are running a
  system where this is the case and this program fails to compile,
  use -DSIMPLECLOCK. Measurement accuracy will be limited to whole
  seconds.

<format>:
-----------------------------------------------------------------------------
  <format> may be one of the following: PNG, RAWIMAGE

  If no format is given, PNG will be used.

  PNG:
  The program reads an image in fibre format and writes
  a PNG file named into the current working directory.
  
  
  RAWIMAGE:
  The program reads an image in fibre format and writes
  the resulting image to a file in simple matrix format. This
  format may be conveniently plotted using gnuplot. For example,
  after running the program:
  
    ./image_filter -o saclogo-edges < saclogo.fibre
  
  display the image data using gnuplot:
  
    gnuplot> plot "saclogo.dat" matrix with image
    gnuplot> plot "saclogo-edges.dat" matrix with image