Help for CORNER
PURPOSE
Program CORNER is a VICAR/IBIS applications program which is used to
find good locations for tiepoints in an image. CORNER looks
for the corners of objects or features in the image.
EXECUTION
Program CORNER looks for corners of objects or features in the input image.
A corner is defined as a bend or curve in an edge. An edge is defined as a
contour line of brightness (DN) having a large brightness gradient relative
to neighboring contour lines.
Program CORNER scans the image looking for edge pixels. When an edge pixel is
found, CORNER checks if the edge is bent at that pixel. This is done by
sampling the image along the line perpendicular to the gradient and checking
for a local minimum or maximum at the pixel that was found. If there is such
a local minimum or maximum, CORNER considers the pixel to be a corner. The
sharpness or quality of the corner is measured by the absolute value of the
second derivative of brightness as a function of position along the line
perpendicular to the gradient. (The first derivative is 0 at a local
minimum or maximum.) The scanning algorithm is designed more for speed than
thoroughness and consequently does not find all corners of features.
CORNER divides the input image into NAV rows (and NAH columns) of rectangular
cells. CORNER uses the portion of the input image defined by the SIZE
parameter, minus any border specified by the BORDER parameter. For each
rectangular cell, CORNER finds the corner of greatest quality.
The algorithm used for finding corners has two parameters that can be used to
adjust the program's response to noise in the image and to features or objects
of differing sizes. The GTHRESH parameter is used roughly as a gradient
magnitude threshold for edge detection. If GTHRESH is defaulted, the program
automatically computes a threshold based on the brightness variation in the
image. The WIDTH parameter determines the size of the interval over which the
gradient and second derivative are computed. The larger the WIDTH parameter,
the less the program pays attention to noise and fine detail.
The data type of the input image may either be byte or halfword data. The data
type is obtained from the VICAR label of the input image.
The output file is an IBIS interface file. (See the DCL HELP on IBISFIL.)
This IBIS interface file has three columns, all with length NAH*NAV. Each
column is stored in REAL*4 format. The IBIS interface file has one row for
each rectangular cell. The first two columns contain the line and sample
coordinates for the corner of greatest quality in the cell. The third
columns contain the quality of the corners. The quality is approximately the
absolute value of the second derivative of brightness. This value is not
normalized, but the larger the quality, the more distinct the corner.
If no corner is found in a given rectangular cell, all three values are 0.
TAE COMMAND LINE FORMAT
The following command line formats show the major allowable forms:
corner INP=a OUT=b SIZE=(sl,ss,nl,ns) optional parameters.
corner INP=a OUT=b SL=sl SS=ss NL=nl NS=ns optional parameters.
corner INP=a OUT=b (sl,ss,nl,ns) optional parameters.
corner INP=a OUT=b optional parameters.
Here 'a' represents the input image file name,
and 'b' represents the output IBIS interface file name.
EXAMPLES
1. corner INP=A OUT=B WIDTH=10 BORDER=32
In this example CORNER divides the image into 25 (the default)
rectangular pieces and finds the best corner location in each piece.
All locations found will be more than 32 pixels from the edge of the
image so that these locations can be used for FFT correlation by another
program. The WIDTH parameter is set so that image noise and most
features much less than 10 pixels in diameter will be ignored.
RESTRICTIONS
1. The input image must be byte or halfword data.
2. The maximum number of pixels per line is 60000. The number of pixels
per line times (2*WIDTH + 1) must not exceed 300,000.
3. The maximum number for NAH or NAV is 1000.
4. The WIDTH parameter must be in the range 1 to 50.
WRITTEN BY: Steve Pohorsky 16 May 1986
PORTED TO UNIX BY: Randy Schenk (CRI) 2 Jan 1995
COGNIZANT PROGRAMMER: Steve Pohorsky 16 May 1986
REVISION: 1 16 May 1986
PARAMETERS:
INP
Input image.
OUT
Output IBIS interface file name.
SIZE
Standard Vicar size field:
(SL,SS,NL,NS)
You can enter SL,SS,NL,
and NS together as SIZE, OR
enter the SL,SS,NL, and NS
parameters separately.
SL
Starting line number
SS
Starting sample number
NL
Number of lines
NS
Number of samples
WIDTH
Width of interval used for
corner finding.
GTHRESH
Gradient threshold used for
corner finding.
NAH
Number of columns of rectangles
to divide image into.
NAV
Number of rows of rectangles
to divide image into.
THRESH
Threshold for finding edge of
imge data.
BORDER
Border width.
PRINT
Enter 'NOPRINT for no printed
output.
See Examples:
Cognizant Programmer: