PLEASE NOTE : This is the documentation for the avs module executable feature, which contains the following modules: vfractal vpml vpolygon vrmatch vshape vspatial vstereo vtexture Any mention of an xvimage is actually a "field 2D". Also, the INPUTs and OUTPUTs, which are mapped to avs parameters, inputs, and outputs, are for the khoros library routine. ************************************************************************************ Documentation for avs module vfractal INPUT img xvimage structure region region window size argument lo_size starting size of sliding window step step size or increment of sliding window OUTPUT img holds the resulting feature of the image. img is used for both the input xvimage struc- ture and the resulting output xvimage struc- ture. DESCRIPTION vfractal performs a fractal feature extraction of an image via calculation of the fractal dimension "D". The fractal dimension is computed based on a calculation of the Hurst coefficient within a selected window size or "fractal region" of the image. The Hurst coefficient is a measure of the slope of the line relating the window size vs average range of image intensity. The Hurst coefficient is related to the fractal dimension as follows, D = 3 - H where, D - is the resulting fractal dimension H - is the computed Hurst coefficient 3 - constant related to the Euclidian geometry The fractal dimension operation is computed, using overlap- ping windows, over the entire image. A range of window sizes up to one third of the size of the fractal region are used to compute the fractal dimension. The center pixel in each fractal region is updated based on the Hurst coeffi- cient and subsequent fractal dimension calculation for that region. The input image, which MUST be of data storage type FLOAT, corresponds to the -i argument. The output image, which corresponds to the -o argument, is stored as data type FLOAT. The resulting output image will be a single band image, and will have a border consisting of pixels of value 0, since the window operation does not calculate values for border pixels. The size of the window for the "fractal region" is specified by the -r region size argument. The region size argument cannot be an even number. This means that the region dimen- sions must be odd (ie. 15x15, 17x17, etc.), since the center pixel is replaced with the computed value of the window data. The default region size is 15x15. The initial size of the sliding window in the fractal region is specified by the -w initial sliding window size argument. The size of the sliding window cannot be less than 2 and cannot exceed 2 minus the upper window size. The upper win- dow size is determined by the region size, and cannot exceed one-third of the region size. The size of the lower window cannot exceed 2 minus the upper window size, because at least two points are needed to calculate the slope of the best fit line. The step size specifies the increment to use when increment- ing the sliding window size from the initial size (-w argu- ment) to the upper window size (determined from the region size). The step size cannot exceed a value that would prevent at least two points from being used to calculate the slope of the best fit line. The step size is specified by the -s step size argument. Each pixel in the image is updated with a computed value except the border pixels. A 15x15 window will result in a border of seven pixels, a 17x17 window will result in a border of eight pixels, etc. The resulting feature vector will contain one band of data, which contains the computed fractal dimension "D" of the image intensity data for the particular region size selected. Note that different results may be obtained by varying the region size and initial size of the sliding win- dow. Comments - To calculate the overall fractal dimension of an image, set the region size to be the same size as the image (Note: region size must be odd), and use an initial sliding window size about one-fourth to one-third of the region size. This will result in one value for the fractal dimension of the image, which can be obtained from running vstats. When running this algorithm on a large image using a wide range of sliding window sizes, it may be helpful to use a generous step size to speed up the processing of the image. For example, if a 256 by 256 image is being processed with a region size of 65 and an initial sliding window size of 3, it may be helpful to select a step size of about 6. The following window sizes would be used in the calculation of the Hurst coefficient (slope of best fit line): window sizes --> 3 9 15 21 If finer resolution is needed, a smaller step size should be used at the expense of processing time. To view the resulting fractal dimension image in 3-D, use Xprism3 to plot the image as a surface plot. The input image MUST be of data storage type FLOAT. The output image is of data storage type FLOAT. img the "img" argument specifies the input image, which must be of data storage type FLOAT. The output image is stored as data type FLOAT. The resulting output image will be a single band image, and will have a border consisting of pixels of value 0, since the window opera- tion does not calculate values for border pixels. region the "region" size argument specifies the size of the window for the fractal region. The region size argument cannot be an even number. This means that the region dimen- sions must be odd (ie. 15x15, 17x17, etc.), since the center pixel is replaced with the computed value of the window data. The rou- tine checks to make sure that the region size does not exceed the image size. lo_size the "lo_size" argument specifies the initial size of the sliding window in the fractal region. The size of the sliding window can- not be less than 2 and cannot exceed 2 minus the upper window size. The upper window size is determined by the region size, and cannot exceed one-third of the region size. The size of the lower window cannot exceed 2 minus the upper window size, because at least two points are needed to calculate the slope of the best fit line. The proper bounds of the window sizes are checked in this routine. step the "step" size specifies the increment to use when incrementing the sliding window size from the initial size to the upper window size (determined from the region size). The step size cannot exceed a value that would prevent at least two points from being used to calculate the slope of the best fit line. The step size is checked to ensure that at least two points are generated for the calcu- lation of the slope. SEE ALSO vfractal(1), intro(3), vipl(3), verror(3), vutils(3) RESTRICTIONS vfractal will only operate on images of data storage type FLOAT. The output image is of data storage type FLOAT. AUTHOR Charlie Gage COPYRIGHT Copyright 1991, University of New Mexico. All rights reserved. ************************************************************************************* Documentation for avs module vpml INPUT img input image structure lower specifies the initial size of the sliding window. upper specifies the upper size of the sliding win- dow. step specifies the step size or interval for a range of window sizes. range_q specifies the range of moments to base the P(m,L) calculations on. OUTPUT img1 output image structure, may be multiband. fd_img fractal dimension image, represents the frac- tal dimension vectors. printdev ASCII output file for the image information. DESCRIPTION vpml estimates the fractal dimension of an image based on the probability that there are m pixels within a window of size L centered on a pixel from a particular class. For a selected range of window sizes (L), the window is centered on the first occurrence of the pixel belonging to a particu- lar class. The number of pixels within a window of size L, belonging to a specific class are counted (including the center pixel of the window), and a "histogram" is formed as the window is moved over the image. This "histogram" represents the total number of occurrences, m, of a class of pixels in a window of size L. From this, a normalized histogram is formed, which yields an estimate of the proba- bility density function, P(m,L), for each window size L. All selected moments (q) of the P(m,L) distributions for each of the desired window sizes are determined, and a linear regression or "best fit line" is found for the moment generating function, log(M(L))^1/q, versus the log of the window size, log(L). The slope of the "best fit line" pro- vides an estimate for the fractal dimension, D. The center pixel of the largest window, Lmax, is replaced with the computed fractal dimension based on the probability density function, P(m,L). The largest window size, Lmax, determines the resulting size of the fractal dimension image. This results in a border of size (Lmax / 2) around the image, which is set to zero. The input image MUST be of data storage type BYTE or INTEGER. The input arguments are described as follows: img specifies the input image, which must be of data type BYTE or INTEGER. The input image must be a single band image. img1 specifies the output image, which will be a multiband image representing the fractal dimension of the input image for each of the specified moments. The resulting output image will be of data storage type FLOAT, and will have a border of pixels of value zero. The size of the border will be determined by the size of the largest window specified. This can be determined from the following formulation, (Lmax -1) / 2 = border size. Where Lmax is the size of the largest window used. For example, if the largest window size is 9, then the border size will be (9 - 1) / 2 = 4 pixels. fd_img specifies fractal dimension image, represent- ing the fractal dimension vectors for each class and moment. This image will always have a row size of 1 and a column size deter- mined by the number of classes in the input image. The number of data bands will be equal to the number of moments used in the estimation of the fractal dimension. printdev uses an ASCII file as output for the image information specifying the size of the input image, number of classes in the input image, and the range of moments used in the estima- tion of the fractal dimension. Also included is a listing of the fractal dimensions for each class and moment. lower specifies the initial or lower size of the sliding window. This MUST be an odd number resulting in a window with a center pixel. This means that the minimum size of the slid- ing window is 3 x 3. The default value is 3, resulting in an initial window size of 3 x 3. upper specifies the final or upper size of the sliding window. This MUST also be an odd number resulting in a window with a center pixel. The size of the upper window MUST be at least one step greater than the lower win- dow size. That is, if the lower window is 3 x 3, then the minimum size of the upper win- dow must be 5 x 5, or one step greater than the lower window. This is necessary, since there must be at least two points for a best fit line to be formed determining the slope and ultimately the fractal dimension. step specifies the step size or interval used when specifying a range of window sizes. The default value is two, corresponding to the next odd window size with a center pixel. This may be helpful when a wide range of win- dow sizes is required, as it will reduce the number of points generated for the best fit line and hence the number of calculations. range_q specifies the range of moments to base the P(m,L) fractal dimension calculations on. This must be an odd number, corresponding to the number of moments centered on zero. For example, a value of 5 would result in the computation of the fractal dimension for the range of moments, -2, -1, 0, 1, 2. The default value is 3, resulting in the range of -1, 0, 1. The input image MUST be of data storage type BYTE or INTEGER. SEE ALSO vpml(1), intro(3), vipl(3), verror(3), vutils(3) RESTRICTIONS The input image MUST be of data storage type BYTE or INTEGER. The output images are of data storage type FLOAT. AUTHOR Charlie Gage COPYRIGHT Copyright 1991, University of New Mexico. All rights reserved. ************************************************************************************ Documentation for avs module vpolygon INPUT image -- xvimage structure of edge image (input image) seuil -- double of threshold value for approximation error. coef -- double of percentage line length that is rejected. longmin -- integer of minimal length for skipping over too small straigth lines. OUTPUT image -- xvimage structure of 2D image to display the result of linear approximation. vector -- xvimage structure of output vector image. DESCRIPTION vpolygon will create a vector image resulting of a linear approximation. image is a pointer to a xvimage structure that contains the edge image to process. Note that image is used for both the input xvimage structure and the resulting output xvimage structure for displaying. This is done to save space, but you must be careful not to overwrite impor- tant data. SEE ALSO vpolygon(1), intro(3), vipl(3), verror(3), vutils(3) RESTRICTIONS vpolygon will operate on VFF_TYP_4_BYTE data storage types and with edge points set to 255. AUTHOR Jean-Pierre COCQUEREZ, Marc VIALA, Pascal ADAM COPYRIGHT Copyright 1992, University of New Mexico. All rights reserved. ************************************************************************************* Documentation for avs module vrmatch INPUT ima1 _ xvimage structure : First Input Image to be matched. ima2 _ xvimage structure : Second Input Image to be matched. OUTPUT image holds the result (matched regions). DESCRIPTION WARNING: This is a temporary algorithm which has been used for stereo application prototyping. It can't be considered as the result of deep research on the topic. vrmatch analyses two input images supposed to be similar. The input images can either be the left and right images of a stereo image data base or successive images from an image data flow process. These images have to be previously preprocessed in the fol- lowing manner: Region_segmentation: This segmentation should give an image in which each connex region is labelled with its own label number. Also, this image has to be an integer image (VFF_TYP_4_BYTE). The matching principle could be modified for different application purposes but this first try will use a computa- tion of the probability for the region number Ni (first image) being region number Mj (second image). P(Ni = Mj) = 1 - Surface( SXOR (Ni , Mj)) / (Surface (Ni) + Surface(Nj)) SXOR is computed by translating Ni by a vector V such that the new centroid of Ni and the Mj's one coincide. If SXOR(Ni,Mj) is small (surface of Ni matches with Mj) the probability of Ni being Mj is close to 1. On the contrary if SXOR(Ni,Mj) is relatively big (the two surfaces don't match : different shape or size, etc) then the probability of Ni being Mj is close from 0. In stereo or optical flow there is some differences of shape between two regions representing the same thing. If these differences are too important (due to the segmentation algo- rithm like vlabel ,etc, or simply to the fact that images are really different) then the probability for these regions being the same object won't be as good as expected. In that case a heuristic approach will try to match them relying on the distance between the two centroids. The final result is an image containing both image1 and image2 on the left and right side, in which the label of each connex matched region will be the same for the left and right part making it possible for one to see what has been recognized. SEE ALSO vrmatch(1), intro(3), vipl(3), verror(3), vutils(3) AUTHOR Pascal Adam COPYRIGHT Copyright 1991, University of New Mexico. All rights reserved. ************************************************************************************* Documentation for avs module vshape INPUT image -- xvimage structure image_type -- if 0, image containing clusters or labelled objs. if 1, grey level image. axis_flg -- if 1, generates the image with axis representation. outline_flg -- if 1, generates the image with outlines representation. file_flg -- if 1, generates the ASCII file with objs or image information. input_file -- name of input file being analyzed printdev -- output device for printing print_flg -- print to printdev if set. standard: if 1, computes and prints standard moments. central: if 1, computes and prints central moments. invariants: if 1, computes and prints invariant moments. OUTPUT image -- xvimage structure, holds the resulting image. axis -- xvimage structure, axis image. outline -- xvimage structure, outline image. DESCRIPTION vshape performs a shape analysis on two different types of images, by extracting features like moments, area, cen- troids, etc. The input "image" is a pointer to an INT xvimage that can be: 1. A grey level image. In this particular case, the features will be computed for the entire image. Some of these features may not appear to make sense, nevertheless they will still contribute significant information to the regions. 2. A labeled or clustered image. The grey level of a pixel in a labeled or clustered image is specifically used to assign a pixel to a particular labeled region. For a labeled image (output of vlabel ipl routine), the classes or regions are connected, however this is not true for a cluster number image (output of vquant, vkmeans or visodata). This difference can confuse a novice user, because vshape will not differentiate between connected or non-connected regions. General Description of vshape. The features listed below are computed for each region or for the entire image, depending on the input image. - Centroid on x and y axis. - Variances on x and y. - Area or weighted area. - Orientation of the principal axis. - Eccentricity of the shape. - Bounded box coordinates. Theses features are optional. - Standard Moments. - Central Moments and Normalized Central Moments. - Invariant Moments. These features are provided in an optional ASCII file. As mentioned above, the centroid coordinates of the grey level input image provides more information than the general sense of the centroid of a region. In addition to the ASCII file, three other output files can be generated. 1. The Axis Image. This image contains a representation of the moments of the regions contained in the input image. It can only be generated when the input image is a not a grey level image. There are two possibilities for representing the moment. The first one is an image containing a cross for each region. The cross center is located at the centroid of the region and the horizontal and vertical axes stop outside of the bounded box of the region. The second one is an image still containing a cross for each region but this time the cross is representative of the moment value in the principal axis system. The principal axis is the coordinate system in which the cross moment, m11 (cf reference for theory on moment below), is equal to zero. Therefore, this cross forms an angle (theta) with the x axis, and its length in both directions are proportional to the "length" of the shape is that direction. 2. The Outline Image. This image contains the outlines of all the regions contained in this image. Again, this can only be generated if this input image is not a grey level image. 3. The VIFF Image. The image contains all of the statis- tics. The VIFF output file has 61 (number of statis- tics) bands and the number of vectors in this file depends on the number of regions specified in the input image. If the statistics flags are not set, the corresponding statistics will default to zero. For these three output images there is a final possibility, which is to assign all outlines or crosses a grey level of 255, or their previous region number. This enables the user to visualize the input image, the outline image, and the axis image using pseudo color to assign a different color to each region. This aids in interpreting the regions, and yields an artistic view of the image. References: 1. Vision In Man And Machine by Martin D. Levine. Chapter 10. "Shape". Page 480. 2. Digital Image Processing by R.C. Gonzales & P. Wintz. Chapter "Representation and description". Page 418. 3. IRE Transactions on information theory,vol IT-8,1962 "Visual Pattern Recognition by Moment Invariants" by Ming_Kuei Hu. Page 179. SEE ALSO vshape(1), intro(3), vipl(3), verror(3), vutils(3) RESTRICTIONS For the x and y representation, x represents the vertical axis and y the horizontal axis. This routine implies a lot of mathematical computation in a direct coordinate system, I didn't use the conventional x and y. AUTHOR Pascal ADAM, Shirley Lee COPYRIGHT Copyright 1991, University of New Mexico. All rights reserved. ************************************************************************************** Documentation for avs module vspatial INPUT img xvimage structure wsize window width argument hsize window height argument m mean operator argument v variance operator argument c contrast operator argument s angular 2nd moment argument e entropy operator argument d dispersion operator argument OUTPUT img holds the resulting feature of the image. img is used for both the input xvimage struc- ture and the output result xvimage structure. DESCRIPTION vspatial performs a spatial feature extraction on an image using a selected statistical operation. The statistical operation is computed, using overlapping windows, over the entire image. The center pixel is updated in each window based on the calculated statistics of that window. The input image, which must be of data storage type BYTE, corresponds to the -i argument. The output image, which corresponds to the -o argument, is stored as data type FLOAT. The output image may be a multiband image depending on how many spatial operators were selected. The resulting image will have a border of pixels of value 0, since the window operation does not calculate values for border pix- els. The width and height of the window is specified by the -w and -h window width and height arguments. The width and height arguments cannot be an even number. The window dimensions must be odd (ie. 3x3, 5x5, 7x7, etc.), since the center pixel is replaced with the computed value of the win- dow data. The default window size is 3x3. Each pixel in the image is updated with a computed value except the border pixels. A 3x3 window will result in a border of one pixel, a 5x5 window will result in a border of two pixels, etc. There are six statistical operations that may be selected. Any combination of the statistical operations may be selected by toggeling the desired argument on (ie. argument followed by a 1). The default for each argument is unselected (ie. argument followed by a 0). The six possible statistical operations and their arguments are: -m -- calculates the mean of the image. -v -- calculates the variance of the image. -c -- calculates the contrast of the image. -s -- calculates the angular second moment of the image. -e -- calculates the entropy of the image. -d -- calculates the dispersion of the image. The resulting feature vector may contain from one to six bands of data, depending upon the number of arguments selected. All input images must be of data storage type BYTE. All output images are of data storage type FLOAT. The spatial feature operations were based on the definitions presented in: "Fundamentals of Digital Image Processing" by A.K. Jain, Prentice-Hall, 1989. o+ img - pointer to input image and resulting output image. o+ xsize - (int): size of window in x-direction (ie. number of rows in window). o+ ysize - (int): size of window in y-direction (ie. number of cols in window). o+ m - (int): command line switch to include mean opera- tion. o+ v - (int): command line switch to include variance operation. o+ c - (int): command line switch to include contrast operation. o+ s - (int): command line switch to include ang. 2nd moment operation. o+ e - (int): command line switch to include entropy operation. o+ d - (int): command line switch to include dispersion operation. vspatial returns a 1 upon success and a 0 upon failure. SEE ALSO vspatial(1), intro(3), vipl(3), verror(3), vutils(3) RESTRICTIONS All input images must be of data storage type BYTE. All output images are of data storage type FLOAT. AUTHOR Charlie Gage COPYRIGHT Copyright 1991, University of New Mexico. All rights reserved. ************************************************************************************** Documentation for avs module vstereo INPUT OUTPUT DESCRIPTION vstereo analyzes an image produced by the routine vrmatch and produces an image in which the pixel value correspond to its distance from the camera Vstereo needs to know the following parameters: The Focal Length of the Camera. The Length of the image inside the camera (CCD matrix) The Height of the image inside the camera (CCD matrix). The distance of the two camera (left and right). The distance that can be considered as the background. The Algorithm works this way: First of all, the input image contains region based segmen- tated images with the image from the left camera on the left side and the right one on the right side. In both the left and right images, the regions that have been matched have the same label (label number starting at 1). Then the process will compute the centroid of these regions then computes the depth from the left and right centroid (cf Stereo formulas at the end of this description). The principle remains simple and gives accurate results if the labelling process gives a precise location of the border of the region in both left and right images. A problem can happened if the region if not entirely in the image because then the position of the centroid will not be accurate. Another problem that happened is that sometimes, the result obtained are not accurate enough to keep them. In this case the distance of the object from the camera will be set to 0. This way we can give the original image and the result one to another stereo algorithm based on a different approach (contour matching or point to point correspondance) and improved the information in the entire distance image. The last comment will be about the background distance that the user has to give in the command line or the graphic interface. This value defines the distance over which the result doesn't matter anymore. Whatever will be further than this limit will automatically be set to the background. In robotics for example, you want to be abble to say to the robot that something is at a distance less then 2 meters from the camera, but you don't care about things that are further than that distance. STEREO formulas. x (left image)/focal length = X (real world) / Z (real world) x (right image) / focal =(X - distance cameras)/ Z (real world) Z (real world) = /x_left - x_right / distance_cameras * focal_length Copyright 1990, University of New Mexico. SEE ALSO vstereo(1), intro(3), vipl(3), verror(3), vutils(3) AUTHOR Pascal Adam COPYRIGHT Copyright 1991, University of New Mexico. All rights reserved. ************************************************************************************* Documentation for avs module vtexture INPUT image the input xvimage image structure. OUTPUT image the resulting output image structure. DESCRIPTION vtexture will extract texture features from an image by con- volving the original image with a spatial filter. The spa- tial filters are comprised of 5 x 5 kernals derived from center-weighted vectors defined by the LAWS texture measure. The five center-weighted vectors are: L5 = [ 1 4 6 4 1] E5 = [-1 -2 0 2 1] S5 = [-1 0 2 0 -1] W5 = [-1 2 0 -2 1] R5 = [ 1 -4 6 -4 1] Each 5 x 5 kernal is derived from multiplying a particular combination of two of the above vectors. This results in 25 possible 5 x 5 kernals. The 25 possible kernals are defined in the vtexture.h include file as 1-D vectors. Createim- age() is called to transform the selected kernal(s) into VIFF images. Once the kernal is transformed to a VIFF image, vconvolve() is called to convolve the input image with the kernal. The result is stored as a texture band in the output image structure. The arguments to vtexture() are: img1 the input image structure, and the resulting output image structure. The input image data is replaced by the resulting texture data for each band. The image header is updated to reflect the number of data bands in the resulting image. L5L5 an integer specifiying whether a specific kernal is to be used. A value of 1 indicates that the kernal is to be used, and a value of 0 indicates that the kernal is not to be used. There are 25 possible command line arguments of this type. SEE ALSO vtexture(1), intro(3), vipl(3), verror(3), vutils(3) lvcon- vert(3), lvconvolve(3). RESTRICTIONS vtexture will operate on images of data storage type BYTE or FLOAT. The output image will be either an INTEGER or FLOAT image, depending on the data type of the input image. If the input image is of data type BYTE or SHORT, then it is converted up to an INTEGER image. If the input image is of data type FLOAT, then the resulting output image will be of data type FLOAT. AUTHOR Charlie Gage COPYRIGHT Copyright 1991, University of New Mexico. All rights reserved. ************************************************************************************* 5/91 Last change: 03/ 2 Sun Release 4.1 Last change: 12/14/9 3 5/91 Last change: 03/ 3 University of New MexicoLast change: 03/26/91 5 Sun Release 4.1 Last change: 12/14/9 2 Sun Release 4.1 Last change: 03/12/9 2 5/91 Last change: 03/ 4 5/91 Last change: 03/ 4 7/9 Last change: 11/ 2 5/91 Last change: 03/ 1 Sun Release 4.1 Last change: 02/23/9 3 INPUT img xvimage structure region region window size argument lo_size starting size of sliding window step step size or increment of sliding window OUTPUT img holds the resulting feature of the image. img is used for both the input xvimage struc- ture and the resulting output xvimage struc- ture. DESCRIPTION vfractal performs a fractal feature extraction of an image via calculation of the fractal dimension "D". The fractal dimension is computed based on a calculation of the Hurst coefficient within a selected window size or "fractal region" of the image. The Hurst coefficient is a measure of the slope of the line relating the window size vs average range of image intensity. The Hurst coefficient is related to the fractal dimension as follows, D = 3 - H where, D - is the resulting fractal dimension H - is the computed Hurst coefficient 3 - constant related to the Euclidian geometry The fractal dimension operation is computed, using overlap- ping windows, over the entire image. A range of window sizes up to one third of the size of the fractal region are used to compute the fractal dimension. The center pixel in each fractal region is updated based on the Hurst coeffi- cient and subsequent fractal dimension calculation for that region. The input image, which MUST be of data storage type FLOAT, corresponds to the -i argument. The output image, which corresponds to the -o argument, is stored as data type FLOAT. The resulting output image will be a single band image, and will have a border consisting of pixels of value 0, since the window operation does not calculate values for border pixels. The size of the window for the "fractal region" is specified by the -r region size argument. The region size argument cannot be an even number. This means that the region dimen- sions must be odd (ie. 15x15, 17x17, etc.), since the center pixel is replaced with the computed value of the window data. The default region size is 15x15. The initial size of the sliding window in the fractal region is specified by the -w initial sliding window size argument. The size of the sliding window cannot be less than 2 and cannot exceed 2 minus the upper window size. The upper win- dow size is determined by the region size, and cannot exceed one-third of the region size. The size of the lower window cannot exceed 2 minus the upper window size, because at least two points are needed to calculate the slope of the best fit line. The step size specifies the increment to use when increment- ing the sliding window size from the initial size (-w argu- ment) to the upper window size (determined from the region size). The step size cannot exceed a value that would prevent at least two points from being used to calculate the slope of the best fit line. The step size is specified by the -s step size argument. Each pixel in the image is updated with a computed value except the border pixels. A 15x15 window will result in a border of seven pixels, a 17x17 window will result in a border of eight pixels, etc. The resulting feature vector will contain one band of data, which contains the computed fractal dimension "D" of the image intensity data for the particular region size selected. Note that different results may be obtained by varying the region size and initial size of the sliding win- dow. Comments - To calculate the overall fractal dimension of an image, set the region size to be the same size as the image (Note: region size must be odd), and use an initial sliding window size about one-fourth to one-third of the region size. This will result in one value for the fractal dimension of the image, which can be obtained from running vstats. When running this algorithm on a large image using a wide range of sliding window sizes, it may be helpful to use a generous step size to speed up the processing of the image. For example, if a 256 by 256 image is being processed with a region size of 65 and an initial sliding window size of 3, it may be helpful to select a step size of about 6. The following window sizes would be used in the calculation of the Hurst coefficient (slope of best fit line): window sizes --> 3 9 15 21 If finer resolution is needed, a smaller step size should be used at the expense of processing time. To view the resulting fractal dimension image in 3-D, use Xprism3 to plot the image as a surface plot. The input image MUST be of data storage type FLOAT. The output image is of data storage type FLOAT. img the "img" argument specifies the input image, which must be of data storage type FLOAT. The output image is stored as data type FLOAT. The resulting output image will be a single band image, and will have a border consisting of pixels of value 0, since the window opera- tion does not calculate values for border pixels. region the "region" size argument specifies the size of the window for the fractal region. The region size argument cannot be an even number. This means that the region dimen- sions must be odd (ie. 15x15, 17x17, etc.), since the center pixel is replaced with the computed value of the window data. The rou- tine checks to make sure that the region size does not exceed the image size. lo_size the "lo_size" argument specifies the initial size of the sliding window in the fractal region. The size of the sliding window can- not be less than 2 and cannot exceed 2 minus the upper window size. The upper window size is determined by the region size, and cannot exceed one-third of the region size. The size of the lower window cannot exceed 2 minus the upper window size, because at least two points are needed to calculate the slope of the best fit line. The proper bounds of the window sizes are checked in this routine. step the "step" size specifies the increment to use when incrementing the sliding window size from the initial size to the upper window size (determined from the region size). The step size cannot exceed a value that would prevent at least two points from being used to calculate the slope of the best fit line. The step size is checked to ensure that at least two points are generated for the calcu- lation of the slope. RESTRICTIONS vfractal will only operate on images of data storage type FLOAT. The output image is of data storage type FLOAT. AUTHOR Charlie Gage