README
============================================================
Name:
edgetools (edgemap.m + edgedir.m)
Version:
1.0
Revision:
005
Release date:
2007-03-22
Author:
Nicola Asuni
Copyright (c) 2006:
Tecnick.com S.r.l.
Via Ugo Foscolo n.19
09045 Quartu Sant'Elena (CA)
ITALY
http://www.tecnick.com
Software License:
GNU GENERAL PUBLIC LICENSE v.2
http://www.gnu.org/copyleft/gpl.html
Descriptions:
edgemap.m
% DESCRIPTION
% --------------------
% This function detects edges, which are those places in an image that
% correspond to object boundaries. To find edges, this function looks
% for places in the image where the intensity changes rapidly, using
% an improved SUSAN technique.
%
% This algorithm is based on the technique described on:
% S.M. Smith, J.M. Brady, "SUSAN - a new approach to low level image
% processing", Int Journal of Computer Vision, 23(1):45-78, May 1997.
% This technicque is subject to a patent:
% S.M. Smith, "Method for digitally processing images to determine the
% position of edges and/or corners therein for guidance of unmanned
% vehicle. UK Patent 2272285. Proprietor: Secretary of State for
% Defence, UK. 15 January 1997.
% USAGE
% --------------------
% [EDG] = edgemap(IM)
% [EDG] = edgemap(IM, TR)
% [EDG] = edgemap(IM, TR, KR)
% [EDG] = edgemap(IM, TR, KR, NR)
% [EDG] = edgemap(IM, TR, KR, NR, OP)
% INPUT
% --------------------
% IM : source image (RGB or grayscale)
% TR : Brightness Threshold (default = 20)
% KR : USAN Kernel Radius (nucleus excluded) (default = 3)
% NR : EDG matrix will be normalized to this range of integers
% (default = 0 = not normalize)
% OP : if true removes from USAN the pixels that are not
% directly connected with the nucleus (default = false).
% IMPORTANT: This optimization is very slow, so use it carefully
% only for small images and when it's really needed.
% OUTPUT
% --------------------
% EDG : edge strength image
% Examples
% --------------------
% Please check the edgexample.m and edgexample2.m files on how to use
% this function.
% NOTES
% --------------------
% This implementation is not intended to be used in a production
% environment. The main purpose of this script is to clearly show how
% this technique works. Better performaces could be obtained using a
% compiled version or rewriting this technique using a low-level
% programming language.
% ---------------------------------------------------------------------
edgedir.m
% DESCRIPTION
% --------------------
% This function detects the angles of the tangents to image edges.
% Angles are counted counter-clockwise starting from horizontal.
% The edges are those places in an image that correspond to object
% boundaries.
% To find the angles of edges, this function uses a modified SUSAN
% technique.
%
% This algorithm is based on the technique described on:
% S.M. Smith, J.M. Brady, "SUSAN - a new approach to low level image
% processing", Int Journal of Computer Vision, 23(1):45-78, May 1997.
% This technicque is subject to a patent:
% S.M. Smith, "Method for digitally processing images to determine the
% position of edges and/or corners therein for guidance of unmanned
% vehicle. UK Patent 2272285. Proprietor: Secretary of State for
% Defence, UK. 15 January 1997.
% USAGE
% --------------------
% [ANG] = edgedir(EDG)
% [ANG] = edgedir(EDG, KR)
% [ANG] = edgedir(EDG, KR, OP)
% INPUT
% --------------------
% EDG : edge strength image
% KR : USAN Kernel Radius (nucleus excluded) (default = 3)
% OP : if true removes from USAN the pixels that are not
% directly connected with the nucleus (default = false).
% IMPORTANT: This optimization is very slow, so use it carefully
% only for small images and when it's really needed.
% OUTPUT
% --------------------
% ANG : angles of the tangents to image edges (edge orientation) in
% radiants ]0,pi]. Angles are counted counter-clockwise starting
% from horizontal.
% Examples
% --------------------
% Please check the edgexample.m and edgexample2.m files on how to use
% this function (uncomment the last line of these files to calculate
% and print the edge orientation matrix).
% NOTES
% --------------------
% This implementation is not intended to be used in a production
% environment. The main purpose of this script is to clearly show how
% this technique works. Better performaces could be obtained using a
% compiled version or rewriting this technique using a low-level
% programming language.
% ---------------------------------------------------------------------
Example:
Check the edgexample.m and edgexample2.m scripts for usage example.
============================================================
- 1
- 2
- 3
前往页