Fractal Dimension - 1D Line Counting

Fractal Dimension - 1D Line Counting

Using this facility in DigImage, the fractal dimension (Kolmogorov capacity) of a selected intensity contour may be evaluated using a line counting algorithm. With this technique the image a line throught the image is divided ino into a number of equal sized sections. The number of sections containing a crossing of the required intensity contour is counted. The process is then repeated with a different size of section. The fractal dimension of the contour is related to the slope of the relationship between the logarithm of the number of sections through which the contour passes and the logarithm of the size of the sections. A linear relationship between these two is an indication of self-similarity, the key feature of fractal contours. As an option, DigImage is able to produce a plot of this information, along with estimates of the slope of the relationship. By producing such a plot, the degree to which a contour is fractal may be visualised.

DigImage performs this calculation for both horizontal and vertical lines falling within the specified region. All horizontal lines within the region are used for the horizontal dimension evaluation, and all vertical lines for the corresponding vertical line calculation.

Note that this technique is very similar to [F Fractal dimension - 2D box counting].

RETURN VALUES DigImage fits a power law to the data using a least-squares fit in log-log space. This fit is plotted along with the raw data, and the fit printed out. The coefficients fitted are also available through the !!Rn mechanism:

       Vertical fractal (plotted first)
           !!R3    The scale factor for the fit.
           !!R4    The power law - this is the "fractal dimension"
           !!R5    The root mean square error in the fit.

       Horizontal fractal (plotted second)
           !!R0    The scale factor for the fit.
           !!R1    The power law - this is the "fractal dimension"
           !!R2    The root mean square error in the fit.

Note that you will normally require a E, F or G modifier to return the floating point representation of these return variables (e.g. !!GR1).

Fractal dimension of which buffer ?

The fractal dimension of a specific intensity contour may be calculated on any valid DigImage buffer may be used.

Calculate dimension in Window or whole Screen ?

The contour on which the dimension is based may be limited to a window (<W>) within a buffer, or the entire buffer (<S>) may be used.

Specify Window: Region to calculate dimension from

The window specification submenu will be produced only if a window (<W>) is selected in the previous entry. Only boxes falling within the window will be used in the fractal dimension calculations. The window is specified in the normal DigImage manner. For further details, consult [H Help] within the submenu.

Dimension of what threshold ?

This entry specifies the intensity level which is to be used for locating the contour on which the fractal dimension is to be calculated.

Name of file to write data to (blank to suppress, .PLT default extension) ?

The box counts and sizes may be written to the formatted file specified by this field. In addition to the fractal data, this file contains plot instructions for use by DigiPlot. The formatted output may be suppressed by entering a blank line.

Produce log-log plot on which buffer (-1 for monitor) ?

As an option, a log-log plot of the number of boxes verses the size of the box may be produced on one of the buffers. The least squares estimate of the line of best fit is also plotted. The plot may be produced on any valid buffer. This buffer is made the current output buffer. A value of -1 is used to indicate that the plot is to be produced on the computer monitor.

Name of output PostScript file (blank to suppress; .PS for printable PostScript .EPS for encapsulated PostScript, or .DPS for data only PostScript) ?

Specifying a file in response to this prompt will cause a PostScript description of the output to be placed in the file. The file will subsequently need to be transfered to a suitable PostScript printer to enable the hard copy to be produced. Entering a blank line suppresses the production of the PostScript file.

Encapsulated PostScript (.EPS) and Data Only PostScript (.DPS) can not be printed directly, except using DigiFile. Normally they would be included within some other package (eg. a word processor) to be printed. The .DPS file is a special version of .EPS which does not contain the normal DigImage\PostScr\Header.PS and DigImage\PostScr\GraphVDU.PS header files. These may need to be added to the PostScript prolog used by the application into which the .DPS file is inserted.

If no extension is specified, then the default PostScript type specified in [;P Printers] in CONFIGUR.EXE will be produced, and the appropriate extension added.

This file may be sent to the printer immediately by specifying PRN as the file name.

{If PostScript file specified} Default, Line, Greyscale or Colour printing ? DigImage is able to produce either grey-scale or colour PostScript files. The Default option is controlled by the setting in the Configur.EXE utility. If colour is selected, then the file MUST be printed on a level 2 (or higher) PostScript printer.

        Default                 Colour type specified in Configur.EXE
        Line                    Greyscale images and dashed line types
        Greyscale               Greyscale images and greyscale lines
        Colour                  Colour images and colour lines - requires
                                Level 2 PostScript

Errors, Warnings and Messages

Message:
Fractal dimension for horizontal: !!R1=!!FR1
Fractal dimension for vertical : !!R4=!!FR4


Parent menu

Main Menu

DigImage User Documentation


Stuart Dalziel, last page update: 19 February 1996