VisionX V4VFDGENVisionX V4
NAME

vfdgen − generate normalized fourier descriptors

SYNOPSIS

vfdgen if=infile of=outfile [ft=filter-type fv=filter-value] [g=<val>] [c=<int>] [id=<int>] [-s] [-r] [-t]

DESCRIPTION

vfdgen reads a file containing 2-D vectors containing X and Y coordinates of a closed contour and computes a normalized Fourier descriptor set for coefficients from -16 to +15 (complex) for each vector. The contour may be filtered to reduce quantization errors. The filtering window is specified as a fraction of the total contour size by the parameter filter-value; e.g. 0.04 specifies a 4% window. The parameter type determines the type of filtering to be used:

        1 -- rectangular
        2 -- triangular
        3 -- gaussian

The most frequently used values for filter and type are 0.04 and 1. The default order for the fourier descriptor vector is: 0,1,-1,2,-2,...15,-15,-16. For a more conventional ordering see option g=6 below. The default output is a feature vector of 64 elements with fourier-descriptor element tags provided for identification.

OPTIONS

Other options are as follows:

-s

do not do scale normalization

-r

do not do rotation normalization

-t

do not do translation normalization

g=<val>

the g option specifies that intermediate information is to be output in the format of a 2D vector.

g=0 output the a feature vector file with the coefficients in the default order
g=1 output the original vector (do nothing)
g=2 output the filtered and resampled original vector
g=3 output the reordered resampled vector
g=4 output the full fourier transform
g=5 output the 32 selected coefficients
g=6 output the 32 normalized descriptors without reordering
that is the order is 0,1,2,..15,-16,-15,...-1.
g=7 output the 32 normalized descriptors with reordering
that is the order is 0,1,-1,2,-2,...15,-15,-16.

c=<int>

the c option is only recognized when the g option is not specified or zero. This sets the class of the item to the value specified.

id=<int>

the id option is only recognized when the g option is not specified or zero. This sets the id of the item to the value specified.

unvalidated options (not operational at tis time)

-i inverse transform: takes Fourier descriptor input and produces X and Y vector output

xy= number of X, Y pairs in inverse el= number of descriptors to be read from ’infile’ for inverse -x generate raw file named ’x’ of X data points or real coefficients for plotting xf=’xfile’ same as -x but call output file ’xfile’

-y, yf=’yfile’ same as -x and xf for Y data points or imaginary coefficients

the following options apply for use with the x or y raw files:

-n reorder real and imag raw outputs to be -16,-15,..,-1,dc, 1,...,15 -p put input into raw outputs instead of output -j join contour: duplicates first x,y value as last to close a contour

AUTHOR

Eric Rossin, APR

BUGS

Input limited to 1024 data points.