RI RV - Find ridges and valleys running up/down an image

(3/05/16)

PURPOSE

Find vertical ridges and valleys running up/down an image and place locations in operation line registers. Originally designed for use with a power spectrum image which has been converted to a rectangular polar coordinate representation with rays along the X dimension. See: 'PO R'.
Each line thus contained a ray from the SPIDER center pixel to the boundary. The first pixel would have originated from the origin (center pixel) of a horizontal line halfway down the image and following rows should be extracted in a clockwise direction. Can be used for finding ridges in some some other types of images as well.   Example.

SEE ALSO

RI R [Find vertical ridges running up/down an image]
PO R [Convert image to polar representation - rays along X]
RO I [Rotational average - 2D Image output]
RO SD [Rotational average - single line output, doc file]

USAGE

.OPERATION: RI RV [key], [yn],[angn],[rn], [yf],[angf], [rf], [ast]
[This operation can return up to seven optional register variables which are same as the content placed in the output doc file.]

.INPUT FILE: PIC001
[Enter name of the file which contains a rectangular polar coordinate representation with rays along the X dimension.]

.OUTPUT DOC FILE: RIRV_DOC
[Enter name of the doc file which will contain statistics on ridges and valleys which run up/down the image. These would correspond to circular/elliptical rings on the original power spectrum.]

.SEPARATION, SUMMED LINES: 50, 2
[Enter separation or exclusion distance between consecutive ridges and number of image lines to be summed before finding maxima. The separation and summed lines inputs allow effective filtration of noisy input images.]

.MINIMUM DISTANCE FOR FIRST RIDGE, DOC FILE KEY: 150, 1
[Enter minimum distance for first ridge and key number for document file listing.]

NOTES

  1. Implemented by ArDean Leith.

  2. Document file output. All angles are in degrees clockwise from origin.
    Register
    Column
    Register Contents
    1, NEAREST RIDGE Y
    Y location of line with nearest first ridge. (pixels)
    2 ANGLE
    Corresponding angle of nearest first ridge.
    3 R1 DISTANCE X
    Distance to first ridge on line with nearest ridge. (pixels)
    4, FURTHEST RIDGE Y
    Y location of line with furthest first ridge. (pixels)
    5 ANGLE
    Corresponding angle of furthest first ridge.
    6 DISTANCE X
    Distance to the first ridge on line with furthest ridge. (pixels)
    7 ASTIGMATISM
    Difference between longest distance to first ridge and shortest distance. (pixels)

SUBROUTINES

FINDRIDGES

CALLER

DRIV1