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

iptk::SteepestAscent Class Reference

#include <steepestAscent.h>

Inheritance diagram for iptk::SteepestAscent:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

A class to perform a steepest-ascent gradient extraction.

The algorithm for steepest-ascent gradient extraction is as follows:

For every pixel in the image, find that neighbour, travelling to which we will have to encounter the steepest ascent. Then this steepness is the gradient.

The steepest-ascent path is that which climbs the most for a fixed distance. Hence, in our algorithm, the steepness measure is got by calculating the ratio of the intensity difference and the distance between the pixels. We should keep in mind that the distance between a pixel and its diagonal neighbour is 1.414, and 1 for other neighbours.

The gradient operation simultaneously generates a 'direction map'. The direction map is an array as large as the image and each cell stores the direction number corresponding to the direction of the gradient at the location. Direction number is the number assigned to each of the possible 8 directions as shown below. If there are no paths of ascent from a pixel, then the gradient there is assigned a value of zero.

6 7 8
5 X 1
4 3 2

The registered image is not disturbed in this process. A new image, with its own memory space, holds the calculated gradient.

NOTE: An RGB image would be converted to a gray-scale image in this process of gradient determination.


Public Member Functions

 SteepestAscent (void)
 Default Constructor.

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

 SteepestAscent (const SteepestAscent &mdg)
 Copy constructor.

virtual ~SteepestAscent ()
 Destructor.

virtual void process (void)
 The function which does the actual gradient extraction.

virtual iptk::Image getResult (void)
 Returns the resulting gradient as an iptk::Image object.


Constructor & Destructor Documentation

iptk::SteepestAscent::SteepestAscent void   ) 
 

Default Constructor.


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

iptk::SteepestAscent::SteepestAscent const iptk::Image im  ) 
 

Image registering constructor.


The image is autmatically registered at the construction stage.

iptk::SteepestAscent::SteepestAscent const SteepestAscent mdg  ) 
 

Copy constructor.


It is only a reference copier. i.e, the new object and the old object share the same data in memory.

virtual iptk::SteepestAscent::~SteepestAscent  )  [virtual]
 

Destructor.


Does nothing.


Member Function Documentation

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

Returns the resulting gradient as an iptk::Image object.


The returned image is meaningfull only after a call to process member function.

Reimplemented from iptk::Gradient.

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

The function which does the actual gradient extraction.


A call to this function is meaningfull only after an image has been registered with the current object.

Reimplemented from iptk::Gradient.


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