LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::susan Class Reference

A class for SUSAN image Processing. More...

#include <ltiSusan.h>

Inheritance diagram for lti::susan:
Inheritance graph
[legend]
Collaboration diagram for lti::susan:
Collaboration graph
[legend]

List of all members.

Classes

class  susanError
 susan error exception More...

Public Member Functions

 susan ()
 ~susan ()
void findEdges (const channel8 &img, channel8 &edges)
void binaryEdges (const channel8 &img, channel8 &binEdges)
void binaryEdges (const channel &img, channel &binEdges)
void setThreshold (int t)
void setOffOnValues (const ubyte off, const ubyte on)
const char * getTypeName () const

Detailed Description

A class for SUSAN image Processing.

The SUSAN principle implements a fast-low level approach for finding binary edges and corners and reducing noise in grey channel images. The basic idea is to move a circular mask of 37 pixels over the image and compare the brightness of all peripheral pixels to the brightness of the center. The sum of all pixels who's brightness is equal (or similar) to the center point gives the USAN value (Univalue Segment Assimilating Nucleus), which can be used to determine the presence of edges and corners or to reduce noise. For more details see the Technical Report TR95SMS1c: SUSAN - A New Approach to Low Level Image Processing by Stephen M. Smith, or refer to the source comments. For the use in applications use the frontends derived from the modifier or functor classes (e.g. lti::susanEdges)!!!


Constructor & Destructor Documentation

lti::susan::susan (  ) 

default constructor

lti::susan::~susan (  ) 

copy constructor

destructor


Member Function Documentation

void lti::susan::binaryEdges ( const channel img,
channel binEdges 
)

draw binary edge image.

According to the SUSAN Algorithmn, the binary edges in img are detected and stored in the buffer binaryEdges. After that, binaryEdges contains a map of the image, where all edge points are white (255), and all other pixels are black(0).

Parameters:
img the channel with the input image
binEdges a channel8-buffer to store the result in black and white.
void lti::susan::binaryEdges ( const channel8 img,
channel8 binEdges 
)

draw binary edge image.

According to the SUSAN Algorithmn, the binary edges in img are detected and stored in the buffer binaryEdges. After that, binaryEdges contains a map of the image, where all edge points are white (255), and all other pixels are black(0).

Parameters:
img the channel with the input image
binEdges a channel8-buffer to store the result in black and white.
void lti::susan::findEdges ( const channel8 img,
channel8 edges 
)

find edges in img and visualize them in edges.

According to the SUSAN Algorithmn, the binary edges in img are detected. A copy of img is made in edges and the edgepoints are highlighted by setting the brightness to 255. There is no need to cut edges to the right size, findedges() will do this (i.e. all data in edges is erased). findEdges() is notably slower than binaryEdges, because the whole image data is being copied (and it's just for demonstartion purpose)

Parameters:
img the channel with the input image
edges a channel8-buffer to store the result.
const char* lti::susan::getTypeName ( void   )  const [inline, virtual]

returns the name of this type

Reimplemented from lti::object.

void lti::susan::setOffOnValues ( const ubyte  off,
const ubyte  on 
)

set the values used to indicate a no-edge (off) and edge (on) pixels

void lti::susan::setThreshold ( int  t  ) 

set brightness threshold.

the brightness threshold is roughly the value to determine the similarity of pixels (counted in grey values. i.e. threshold = 20 declares all pixel similar to the center pixel, who's brightness does not differ by more than roughly +/- 20 greylevels). The default is 20. In effect, a lower threshold finds more edges, a higher threshold finds less edges, since the algorithmn of detecting an edge from an USAN is more subtle than comparing brightness values ! In reality, the similarity function is expressed in gaussian curve rather than a rectangle, where the similarity (0..100, 100 is maximum similarity) is given by

 c = 100*exp(-((I-Io)/t)^6) 

with Io being the brightness of the center pixel to be compared, and I the brightness of the considered pixel. The exponent 6 is an arbitrary form factor for the gaussian curve.

Parameters:
t brightness threshold between 1 and 255, default is 20
Exceptions:
susanError is thrown if threshold is out of range.

The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:55 2010 for LTI-Lib by Doxygen 1.6.1