Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::transforms::CircularHough< T, graphics::Point< double > > Class Template Reference

#include <Hough.h>

Inheritance diagram for prapi::transforms::CircularHough< T, graphics::Point< double > >:

prapi::ImageTransform< T, graphics::Point< double > > List of all members.

Detailed Description

template<class T>
class prapi::transforms::CircularHough< T, graphics::Point< double > >

The circular Hough transform for gradient images.

The algorithm used here is a modified version of the one typically found in computer vision textbooks. Instead of blindly trusting the given gradient directions, an error term can be given to indicate the trustworthness of the gradient estimates. Since gradients are typically measured with 3x3 masks, they cannot be very accurate. When a measure of the angular error is involved, the transformation method assumes the real value of the gradient is normally distributed around the given angle estimate. The width of the distribution is dependent on the error estimate.

Public Methods

 CircularHough (double magnitudeThreshold, int startRadius=1, int endRadius=-1, double radiusStep=1, double gradientError=0)
 Create an instance of the circular Hough transform.

void setThreshold (double threshold)
 Set the threshold.

double getThreshold () const
 Get the current threshold.

void setRadii (int start, int end, double step)
 Set the radii that the transform looks for, and the sampling step.

int getStartRadius ()
 Get the start radius.

int getEndRadius ()
 Get the end radius.

double getRadiusStep ()
 Get the sampling step.

void setGradientError (double error)
 Set the gradient error estimate.

double getGradientError ()
 Get the gradient error estimate.

util::Matrix< T > getTransformedImage (const util::Matrix< graphics::Point< double > > &mat) throw (ImageTransformException&)
 Transform a gradient image.

Member Function Documentation

template<class T>
prapi::transforms::CircularHough< T, graphics::Point< double > >::CircularHough double    magnitudeThreshold,
int    startRadius = 1,
int    endRadius = -1,
double    radiusStep = 1,
double    gradientError = 0

Create an instance of the circular Hough transform.

The transform detects circles with a number of different radii, specified with the start/endRadius parameters and radiusStep. The total number of 2-D transformation domains stacked on each other is (endRadius - startRadius)/radiusStep.

magnitudeThreshold  in transformation, use only pixels with gradient magnitudes not less than this value.
startRadius  find circles with radii not smaller than this value
endRadius  find circles with radii not larger than this value. If endRadius is set to a number less than 1, all circles up to the largest possible one are found.
radiusStep  create a new 2-D transformation domain for each this many pixels.
gradientError  an estimate of the error in your gradient measurements (in radians). This value defines the range the real gradients will "most likely" fall into, given a gradient estimate. The transform assumes the real gradient is somewhere in the direction of the estimate +- gradientError.

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.