Scale Space Edges
Scale Space Edges is a freely available set of Matlab programs (m-files) that identifies maximal spatial intensity transitions in images (it's an edge detector). Its design emphasizes edge segment continuity and accurate characterization of edges for use in image segmentation and feature extraction. It can be configured to find the most salient edge segments early in the full search, and/or exhaustively search a given range of scale space.
Edge points are defined as having a first derivative magnitude (2-D space) that is locally maximal (in scale space) in the first derivative direction. The algorithm locates and follows edge segments, across the image and across scales, using a large set of oriented Difference of Gaussian filters to identify gradient directions and gradient maxima.
More details about Scale Space Edges and the rationale behind its implementation
The program finds all edges (no smoothing or threshold parameters are used for the search) of an image within a range of scales and saves the edge information in a Matlab (.mat) file. It also generates a filter bank and intermediate scale space representations of the image. A display program maps resulting edges that satisfy user defined salience thresholds.
Scale Space Edges not a finished product and is made available for demonstration
and evaluation purposes only. It is not optimized (it's slow and uses
a significant amount of memory), and is subject to change without notice
(see version number in m-file header). Some of the m-files (particularly
ss_edges.m
) have comments and hard coded parameters which allow and encourage changes
to its operation. Other m-files are sparsely documented, difficult
to read, and obscured by layers of experimentation.
Examples:
rat MRI example |
clown example |
MRI example |
output and display window description |
Download:
Scale Space Edges, version 1.2c:
OR each file individually:
ss_edges.m
ss_make_DoG_filters.m
ss_DoGauss.m
ss_k_planes.m
ss_edge_worm.m
ss_display_edges.m
ss_get_image_from_file.m
ss_write_edge_images.m
ss_segment_summary.m
ss_region_hierarchy.m
ss_region_average.m
ss_write_Space_16bitIndexedTree.m
ss_edges_of_list.m
Save these files to a directory in your Matlab path, or in your current
directory.
Please do not redistribute modified files without changing the name and
ownership of the files.
Use:
To use Scale Space Edges to find edges of an image, at the Matlab prompt
( >> ) type:
>> ss_edges( 'Clown.tif' )You might want to start with a small image (~100x100) to get a feel for how long the program takes to run. A large image (1000x1000) will likely try your patience and may overwhelm your resources. See tips for reducing resource requirements.
The image file (Clown.tif) must be in the current directory and of a file type that Matlab understands (JPEG, TIFF, PNG, and a few others.) The first time ss_edges.m is used, a filter bank file with a default name of ss_DoG_filters.mat is generated. The first time ss_edges.m is used with a particular image, a set of files with default names like Clown_plane_k[#].mat is generated. Each time ss_edges.m is used, a new (or overwritten) file with a name like edges_Clown.mat is generated. When the program finishes, it will display a figure with vector edge segments overlaid on the image, and a scatter plot showing how segment statistics relate to the default salience threshold values.
The edges (stored in edges_Clown.mat) can be re-displayed
(see example
display window description
) with different windowing options and salience thresholds using ss_display_edges.m
:
>> ss_display_edges( 'edges_Clown', 2 );or
>> ss_display_edges( 'edges_Clown', 2, 2, .013, .03, 5, 20, 1.5 );
See the ss_display_edges.m header for a description of the parameter
values.
These and other default parameters can be modified in the body of
ss_display_edges.m and ss_edges.m. See
tips
for suggestions when modifying critical default parameters.
Requirements:
A computer with a healthy amount of RAM, an image, and some time.
MathWorks Matlab 5.0 or higher
MathWorks Signal Processing Toolbox
MathWorks Image Processing Toolbox
Mark Dow , April 2004