Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::texture::DifferentialEdgeDetector< T, U > Class Template Reference

#include <EdgeDetector.h>

Inheritance diagram for prapi::texture::DifferentialEdgeDetector< T, U >:

prapi::texture::EdgeDetector< T, U > prapi::ImageTransform< U, T > prapi::texture::Canny< T, U > List of all members.

Detailed Description

template<class T, class U = bool>
class prapi::texture::DifferentialEdgeDetector< T, U >

This is the base class for all EdgeDetectors which are made by using two, X and Y masks.

The base operator are defined in the class and the base operators like Sobel, Prewitt and Roberts.


Public Methods

 DifferentialEdgeDetector (EdgeMask mask, BorderAction borderAction=BORDER_REFLECT)
 Constructor which will be used when implemented mask are used.

 DifferentialEdgeDetector (ConvolutionMask< double > &maskX, ConvolutionMask< double > &maskY, BorderAction borderAction=BORDER_REFLECT)
 Constructor which will be used when own mask are used.

 ~DifferentialEdgeDetector ()
 The Destructor of Differentian edge detector.

void setMask (EdgeMask mask)
 Function set's the mask (enumeration Mask) for EdgeDetector.

ConvolutionMask< double > getConvolutionMask (Gradient gradient)
 Get Convolution mask gives the convolution mask.

util::Matrix< prapi::graphics::Point<
double > > 
getGradientMatrices (const util::Matrix< T > &mat)
 Calculate the edge gradients in an input image, and return the gradients in x and y directions.

util::Matrix< prapi::graphics::Point<
double > > 
getGradientAngleAndMagnitude (const util::Matrix< T > &mat)
 Calculate edge gradients and return them as a gradient magnitude-angle image.

util::Matrix< U > getTransformedImage (const util::Matrix< T > &mat) throw (ImageTransformException&)
 Detect edges in an image.


Protected Methods

 DifferentialEdgeDetector (BorderAction borderAction)
 The constructor for the child classes.


Protected Attributes

ConvolutionMask< double > _ConvolutionMaskX
 The Convolution mask for the X and Y gradient.

ConvolutionMask< double > _ConvolutionMaskY


Constructor & Destructor Documentation

template<class T, class U = bool>
prapi::texture::DifferentialEdgeDetector< T, U >::DifferentialEdgeDetector EdgeMask    mask,
BorderAction    borderAction = BORDER_REFLECT
[inline]
 

Constructor which will be used when implemented mask are used.

Parameters:
mask  The implemented mask used in EdgeDetection.
radius  The radius used in suppresNonMaxima. Note that when radius is zero suppression isn't made.
borderAction  How to handel the borders when needeed.

template<class T, class U = bool>
prapi::texture::DifferentialEdgeDetector< T, U >::DifferentialEdgeDetector ConvolutionMask< double > &    maskX,
ConvolutionMask< double > &    maskY,
BorderAction    borderAction = BORDER_REFLECT
[inline]
 

Constructor which will be used when own mask are used.

Parameters:
maskX  The convolution mask which is used calculatin the X gradient.
maskY  The convolution mask which is used calculatin the Y gradient.
radius  The radius used in suppresNonMaxima. Note that when radius is zero suppression isn't made.
borderAction  How to handel the borders when needeed.


Member Function Documentation

template<class T, class U>
ConvolutionMask< double > prapi::texture::DifferentialEdgeDetector< T, U >::getConvolutionMask Gradient    gradient
 

Get Convolution mask gives the convolution mask.

Parameters:
gradient  The X or Y convolution mask.

template<class T, class U>
util::Matrix< prapi::graphics::Point< double > > prapi::texture::DifferentialEdgeDetector< T, U >::getGradientAngleAndMagnitude const util::Matrix< T > &    mat
 

Calculate edge gradients and return them as a gradient magnitude-angle image.

Each pixel in the returned image stores the gradient angle (Point::x) and the gradient magnitude (Point::y) of the corresponding pixel of the input image.

template<class T, class U>
util::Matrix< prapi::graphics::Point< double > > prapi::texture::DifferentialEdgeDetector< T, U >::getGradientMatrices const util::Matrix< T > &    mat
 

Calculate the edge gradients in an input image, and return the gradients in x and y directions.

Parameters:
mat  the input image.

template<class T, class U>
util::Matrix< U > prapi::texture::DifferentialEdgeDetector< T, U >::getTransformedImage const util::Matrix< T > &    mat throw (ImageTransformException&) [virtual]
 

Detect edges in an image.

The returned image contains the detected edges.

Parameters:
mat  input image
Returns:
edges, typecasted to the type U

Implements prapi::ImageTransform< U, T >.

template<class T, class U>
void prapi::texture::DifferentialEdgeDetector< T, U >::setMask EdgeMask    mask
 

Function set's the mask (enumeration Mask) for EdgeDetector.

Parameters:
mask  The Mask wanted to use.


The documentation for this class was generated from the following file:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.