Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

iptk::Hough Class Reference

#include <hough.h>

Inheritance diagram for iptk::Hough:

Inheritance graph
[legend]
Collaboration diagram for iptk::Hough:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class to perform a Hough transform.

A Hough transform is performed using the polar coordinates of a line in the image plane. The transform is available at a different memory location as as object of class Matrix after a call to the process member function. The image registered with an object of this class should be a binary image having pixel intensities of 0 or 255. Else the result of calculating the transform is un-defined. In a binary image, the transform is performed using pixels of intensity value 255 only.


Public Member Functions

 Hough (void)
 Default Constructor.

 Hough (const iptk::Image &im)
 Image registering constructor.

 Hough (const Hough &h)
 Copy constructor Though this constructor does not look like a reference copier, the image data is shared between the passed object(i.e the parameter to the copy constructor) and the new object.

virtual ~Hough ()
 Do nothing destructor.

virtual void process (void)
 The function which does the actual calculation of the Hough transform.

mutk::Matrix getTransform (void)
 Returns the Hough transform.

virtual iptk::Image getResult (void)
 Returns the image with the detected lines on it.

virtual void setParams (double params[])
 Sets the minimum line length size.


Constructor & Destructor Documentation

iptk::Hough::Hough void   ) 
 

Default Constructor.

An object created using the default constructor should set the image by using the setImage member function.

iptk::Hough::Hough const iptk::Image im  ) 
 

Image registering constructor.

The image is autmatically registered at the construction stage.

virtual iptk::Hough::~Hough  )  [virtual]
 

Do nothing destructor.

Destructor does nothing at all as the default destructor would have been sufficient.


Member Function Documentation

virtual iptk::Image iptk::Hough::getResult void   )  [virtual]
 

Returns the image with the detected lines on it.

The returned image will have the lines identified by the transform. The lines are identified by value of points in the transform. The length of the lines to be detected can be set by a call to the setParams member function. The larger the parameter set, the longer the lines detected. Lines of lesser lengths are ignored. Every call to this function caclulates the line image afresh.

Reimplemented from iptk::IP_Function.

mutk::Matrix iptk::Hough::getTransform void   ) 
 

Returns the Hough transform.

The returned Matrix object is defined only if a call to the process member function was made after a binary image has been registered.

virtual void iptk::Hough::process void   )  [virtual]
 

The function which does the actual calculation of the Hough transform.

To get valid results, this function has to be called only after registering the image.

Implements iptk::IP_Function.

virtual void iptk::Hough::setParams double  params[]  )  [virtual]
 

Sets the minimum line length size.

The parameter set by a call to this function does not affect the calculation of the Hough transform but effects the final line image you are interested in. The params argument should be an array of size atleast 1 with the first element holding the minimum length of the lines to be detected.

Reimplemented from iptk::IP_Function.


The documentation for this class was generated from the following file:
Generated on Mon Nov 22 11:12:42 2004 for ImprolaLib by doxygen 1.3.7