Main Page | Data Structures | Directories | File List | Data Fields | Globals

Sadie_Tools.c File Reference

Destriping, contour lines, pseudo-relief, RMS differences and scattergrams. More...

#include <tcl.h>
#include <tk.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <sadie.h>
#include "tclsadie.h"

Go to the source code of this file.

Functions

int Sadie_Tools_DestripeCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
 Destriping to remove systematic artefacts caused by detector variations.
int Sadie_Tools_ContMapCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
 Generate a binary image showing contour lines from an input image.
int Sadie_Tools_ReliefCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
 Generate a pseudo-relief image from a DEM or arbitrary image.
int Sadie_Tools_ScatterCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
 A scattergram from the joint distribution of pixel values in two images.
int Sadie_Tools_RMSCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
 Compute the root-mean-square difference between two images.
int Sadie_Tools_Init (Tcl_Interp *interp)
 Make the commands defined in this file accessible to the Tcl interpreter.


Detailed Description

Destriping, contour lines, pseudo-relief, RMS differences and scattergrams.

Tcl/Tk interfaces to a collection of various utility functions in the SADIE library.

Author:
University of Arizona Digital Image Analysis Lab
Date:
1999, 2004
Version:
Id
Sadie_Tools.c,v 2.4 2005/03/22 22:04:50 mmunro Exp

Definition in file Sadie_Tools.c.


Function Documentation

int Sadie_Tools_ContMapCmd ClientData  client_data,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj *const   objv[]
 

Generate a binary image showing contour lines from an input image.

Given an arbitrary input image, this draws a crude contour map of the pixel values as black and white areas on a new binary image, using the SADIE library function CONTOUR. The Tcl data should conform to the patterns:

  • tcl_array_name(DEFAULT_IN_IMAGE_ADDR_INDEX) the input image ID.
  • tcl_array_name(number) the number of contour lines.
  • tcl_array_name(width) the (fractional) contour line width.
  • tcl_array_name(DEFAULT_OUT_IMAGE_NAME_INDEX) contour image name.

Parameters:
[in] client_data (unused).
[in] interp the Tcl interpreter.
[in] objc number of Tcl object arguments (always two).
[in] objv Tcl object argument list (the Tcl array name).
Returns:
TCL_OK on success, TCL_ERROR on errors.

Definition at line 127 of file Sadie_Tools.c.

References GetSadieDoubleFromObj2(), GetSadieImageFromObj2(), GetSadieIntFromObj2(), and SetSadieImageObj2().

Referenced by Sadie_Tools_Init().

int Sadie_Tools_DestripeCmd ClientData  client_data,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj *const   objv[]
 

Destriping to remove systematic artefacts caused by detector variations.

The SADIE library function DESTRIPE provides several different options to remove the horizontal or vertical stripe artefacts that can appear on images acquired with a sensor that is composed of multiple physical detectors with slightly different physical characteristics. The file sadie.h holds the constants that specify which option to use: the option for the type of line matching can take the values :

  • DESMNE to make only bias adjustments to the detector means,
  • DESSTD to in addition standardize the variances, and
  • DESCDF to match the cumulative distribution functions.

The reference option can take the values

  • DESSNG to use a single detector as the reference for adjustments, or
  • DESAVG to use the mean of all the detectors.

The Tcl data should conform to the patterns:

  • tcl_array_name(DEFAULT_IN_IMAGE_ADDR_INDEX) the degraded image ID.
  • tcl_array_name(option) the line matching option.
  • tcl_array_name(reference) the reference option.
  • tcl_array_name(period) the stripe period (number of detectors).
  • tcl_array_name(detector) the reference detector number.
  • tcl_array_name(number) cumulative distribution function levels.
  • tcl_array_name(DEFAULT_OUT_IMAGE_NAME_INDEX) destriped image name.

Parameters:
[in] client_data (unused).
[in] interp the Tcl interpreter.
[in] objc number of Tcl object arguments (always two).
[in] objv Tcl object argument list (the Tcl array name).
Returns:
TCL_OK on success, TCL_ERROR on errors.

Definition at line 79 of file Sadie_Tools.c.

References GetSadieImageFromObj2(), GetSadieIntFromObj2(), and SetSadieImageObj2().

Referenced by Sadie_Tools_Init().

int Sadie_Tools_Init Tcl_Interp *  interp  ) 
 

Make the commands defined in this file accessible to the Tcl interpreter.

Parameters:
[in] interp the main Tcl interpreter.
Returns:
TCL_OK on success.

Definition at line 295 of file Sadie_Tools.c.

References Sadie_Tools_ContMapCmd(), Sadie_Tools_DestripeCmd(), Sadie_Tools_ReliefCmd(), Sadie_Tools_RMSCmd(), and Sadie_Tools_ScatterCmd().

Referenced by Tcl_AppInit().

int Sadie_Tools_ReliefCmd ClientData  client_data,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj *const   objv[]
 

Generate a pseudo-relief image from a DEM or arbitrary image.

This treats the input image (regardless of actual source) as a digital elevation model, and given some additional parameters for illumination geometry, generates a shaded relief image from it, using the SADIE library function RELIEF (for realistic relief, the input pixel values and the distance parameter should be in the same physical units). The Tcl data should conform to the patterns:

  • tcl_array_name(DEFAULT_IN_IMAGE_ADDR_INDEX) the DEM image ID.
  • tcl_array_name(phi) horizontal illumination angle (radians from E).
  • tcl_array_name(theta) illumination altitude (radians upwards).
  • tcl_array_name(dist) physical distance between input pixels.
  • tcl_array_name(DEFAULT_OUT_IMAGE_NAME_INDEX) relief image name.

Parameters:
[in] client_data (unused).
[in] interp the Tcl interpreter.
[in] objc number of Tcl object arguments (always two).
[in] objv Tcl object argument list (the Tcl array name).
Returns:
TCL_OK on success, TCL_ERROR on errors.

Definition at line 173 of file Sadie_Tools.c.

References GetSadieDoubleFromObj2(), GetSadieImageFromObj2(), and SetSadieImageObj2().

Referenced by Sadie_Tools_Init().

int Sadie_Tools_RMSCmd ClientData  client_data,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj *const   objv[]
 

Compute the root-mean-square difference between two images.

Given a pair of images, we use the SADIE library function RMSDIFF to find the RMS difference between them (a single scalar value), and return this in the Tcl interpreter result.

  • tcl_array_name(inimg,addr1) the first image ID.
  • tcl_array_name(inimg,addr2) a second image ID (may equal the first).

Parameters:
[in] client_data (unused).
[in] interp the Tcl interpreter.
[in] objc number of Tcl object arguments (always two).
[in] objv Tcl object argument list (the Tcl array name).
Returns:
TCL_OK on success, TCL_ERROR on errors.

Definition at line 266 of file Sadie_Tools.c.

References GetSadieImageFromObj2().

Referenced by Sadie_Tools_Init().

int Sadie_Tools_ScatterCmd ClientData  client_data,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj *const   objv[]
 

A scattergram from the joint distribution of pixel values in two images.

Given two bands from a multi-band image, or two images of equal size, we use the SADIE library function SCATTER to generate a scattergram from the values of pixels at corresponding locations. The Tcl data should conform to the patterns:

  • tcl_array_name(inimg,addr1) the first image ID.
  • tcl_array_name(inimg,addr2) a second image ID (may equal the first).
  • tcl_array_name(band1) first image band number (counting from 1).
  • tcl_array_name(band2) second image band number (counting from 1).
  • tcl_array_name(incr) spatial sampling interval (pixels).
  • tcl_array_name(res) the number of 2D histogram bins.
  • tcl_array_name(DEFAULT_OUT_IMAGE_NAME_INDEX) relief image name.

Parameters:
[in] client_data (unused).
[in] interp the Tcl interpreter.
[in] objc number of Tcl object arguments (always two).
[in] objv Tcl object argument list (the Tcl array name).
Returns:
TCL_OK on success, TCL_ERROR on errors.

Definition at line 221 of file Sadie_Tools.c.

References GetSadieImageFromObj2(), GetSadieUintFromObj2(), and SetSadieImageObj2().

Referenced by Sadie_Tools_Init().


Generated on Fri Jul 8 14:55:02 2005 for tclSadie by  doxygen 1.4.2