LOBACK

Establishes the local mode values for parts of an image

Description:

Establishes the local mode values for parts of an image immediately surrounding a set of image co-ordinates supplied by the user.

The user may also supply some indication of the number of pixels that must be used to create the pixel value histogram. This value may be supplied as a number pixels around the given co-ordinates (ie, an area), or alternatively the number of contiguous data points believed to be present in the object at the image location specified. The latter method is intended specifically for use with RGASP’s IMAGES or IRAF’s FOCAS output files.

All co-ordinates are read from the ASCII text file given in the parameter INFILE. The selection of the number of pixels to be used in constructing the histogram is defined by the user, subject to a lower limit of 1024 pixels (32x32).

Usage:

LOBACK IN INFILE SFACT THIRD OUT WIDTH

Parameters:

IN = _NDF (Read)
The name of the NDF data structure/file that is to be examined.
INFILE = _CHAR (Read)
The name of the ASCII text file containing the image co-ordinates and number of pixels to be used at each location or the number of contiguous pixels found there by FOCAS or IMAGES. Co-ordinates are in the Current co-ordinate system of IN.

If two columns are present then these are taken as representing the image co-ordinates required for the regions of the image to be considered. Co-ordinates are in the Current coordinate system of the NDF. If there is a third column, it represents the area, in pixels, of a square centred on the co-ordinates (but see the documentation for the parameters THIRD and WIDTH below).

OUT = _CHAR (Read)
The file name in which the results are stored in text form.
SFACT = _INTEGER (Read)
The Gaussian smoothing filter radius requested. This may be:
  • -1 to indicate that the application should automatically assign a filter radius to apply to the histogram.

  • 0 to indicate that the histogram should not be smoothed.

  • >0 to indicate the radius of the Gaussian filter to use. Values greater than LOB__SFLIM (see include file) are not allowed. The value returned is that employed. Units counts.

THIRD = _LOGICAL (Read)
Determines whether or not the third column found in the INFILE contains the number of contiguous image pixels believed to be at that image location (THIRD=TRUE), or the number of screen pixels to be taken from the image around the required location (THIRD=FALSE). Specifically, if THIRD=TRUE then the width obtained from the pixel-area in the file is multiplied by three.
WIDTH = _INTEGER (Read)
This parameter constrains any area obtained from the third column of the input file, and acts as a default if no such value exists. If the width implied by that column value (that is, its square-root, with any adjustment implied by the value of the parameter THIRD) is less than WIDTH, then that width is replaced by WIDTH. The default value for this parameter, and its minimum permitted value, is 32, giving a minimum pixel count of 1024 (32x32). This ensures that the histogram employed is reasonably well filled under most circumstances. Units pixels.

Examples:

loback in=p2 infile=coords.dat sfact=0 third=true out=backs.dat width=64

Reads the data stored in text file COORDS (in co-ordinates of the Current frame of P2) and determines the background count value within a 64x64 pixel area surrounding each of those locations. The histogram generated to do this will not be smoothed. The output will be into text file BACKS.DAT. Since THIRD is true, the third column represents the number of pixels thought to make up the object.

loback in=p2 infile=coords.dat sfact=4 third=false out=output.dat width=35

Determines the background count value within a 35x35 pixel area surrounding each of the locations identified in COORDS.DAT. The histogram generated to do this will be smoothed using a Gaussian 4 counts wide. The output will be into text file OUTPUT.DAT. Since THIRD is false, the third column represent the lower limit of pixels to be taken from the image to make up the histogram.

Notes:

The current version will not accept a pixel value range greater than the largest integer value possible.

The user may easily abolish the 32x32 pixel filter lower size limit by modifying the WIDTH parameter entry in the LOBACK.IFL file. This action is only recommended for use with very flat images.