Help for SRCHEDGE
PURPOSE:
To find the angle in degrees of the transition edge of an input image.
The transition edge is the line at which a vast difference in DN
values is found.
EXECUTION:
srchedge inp=in.img out=out.img angle=angle [optional-parameters]
METHOD:
INPUT IMAGE:
Only black and white halfword VICAR images are valid. The input
image has only dark and light DN values with one side of the image
dark and the other light. A distinctive straight line created by
the transition edge from dark to light or light to dark separates
the two values.
ddddddddddddddddddddddddll
dddddddddddddddddddddlllll
ddddddddddddddddddllllllll
dddddddddddddddlllllllllll
ddddddddddddllllllllllllll d=dark DN value
ddddddddllllllllllllllllll
ddddllllllllllllllllllllll l=light DN value
dlllllllllllllllllllllllll
lllllllllllllllllllllllll|
llllllllllllllllllllllllll
llllllllllllllllllllllllll
llllllllllllllllllllllllll
PROCESSING:
Srchedge does the following:
1) Finds the transition edge where the dark DN value
and the light DN value come together.
2) Creates an output image file that is the same as the
input file except the transition edge is marked with DN
values of 20,000.
3) Does a least squares fit on the points making up the
transition edge.
4) Gets the angle of the line created by the least squares
fit and returns it in parameter angle.
The angle is measured as follows:
1) Preliminary angle A is obtained such that -90.0< A <=90.0
2) Then there are 6 cases:
A. Dark side on left and A>0 => angle = 360.0 - A
B. Dark side on right and A>0 => angle = 180.0 - A
C. Dark side on left and A<0 => angle = 180.0 - A
D. Dark side on right and A<0 => angle = -A
E. Horizontal w/ dark on top => angle = 180.0
F. Horizontal w/ dark on bottom => angle = 0.0
Note: A local variable of type real for parameter angle must be
declared by the user.
HISTORY:
1996-03-28 Y Kwon - Wrote original version.
1997-07-22 RRD - Ported to UNIX.
1997-10-24 RRD - Improved help section. Fixed bug on Solaris by
changing variable cut from unsigned int to int.
Commented out line in fitpts that calculates sigma
because it generates DOMAIN error.
2019-06-14 WLB - IDS-7924: Fixed formatting directive.
Initialized variables.
Commented out returning sigma value that is not
calculated.
Cleaned up misc. warnings.
COGNIZANT PROGRAMMER: Young Kwon
PARAMETERS:
INP
1 input VICAR image.
OUT
1 output VICAR image.
SKIPNS
Number of samples to skip in
searching for transition edge.
SKIPNL
Number of lines to skip in
searching for transition edge.
DARKSKIP
Number of lines and samples to
skip in calculating the average
DN of the image.
SMALL
Indicates whether the entire
image will be searched.
SMALLSIZE
Indicates the portion of the
image which will be searched.
CUT
Shortens the search area of
the image.
ANGLE
Output angle in degrees of
transition edge. Parameter
is of type real.
See Examples:
Cognizant Programmer: