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

iptk::PrewittGradient Class Reference

#include <prewittGradient.h>

Inheritance diagram for iptk::PrewittGradient:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Class to perform a Prewitt's Gradient extraction.

The algorithm for the Prewitt's gradient extraction can be found in any standard textbook on image processing. This class also extracts a gradient-map. Information on the gradient-map can be got from the documentation of the class iptk::Gradient. Gradients along the horizontal and the vertical are extracted separately as Gx and Gy. The net gradient is then calculated as

G = sqrt(Gx^2 + Gy^2)

The direction of the gradient is calculated as

PHI = atan2(Gy/Gx)

The gradients Gx and Gy are also extracted separately as directional-gradients in two different images.


Public Member Functions

 PrewittGradient (void)
 Default Constructor.

 PrewittGradient (const Image &im)
 Image registering constructor.

 PrewittGradient (const PrewittGradient &rg)
 Copy Constructor.

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

virtual iptk::Image getResult (void)
 Returns the resulting gradient image.

iptk::Image getHorizontalGradient (void)
 Returns the horizontal gradient.

iptk::Image getVerticalGradient (void)
 Returns the vertical gradient.


Constructor & Destructor Documentation

iptk::PrewittGradient::PrewittGradient void   ) 
 

Default Constructor.


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

iptk::PrewittGradient::PrewittGradient const Image im  ) 
 

Image registering constructor.

The image is automatically registered at the construction stage.

iptk::PrewittGradient::PrewittGradient const PrewittGradient rg  ) 
 

Copy Constructor.


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


Member Function Documentation

iptk::Image iptk::PrewittGradient::getHorizontalGradient void   ) 
 

Returns the horizontal gradient.


The image returned is different from the image registered. i.e, the resulting gradient image has its own memory space different from the registered image.

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

Returns the resulting gradient image.


The image returned is different from the image registered. i.e, the resulting gradient image has its own memory space different from the registered image.

Reimplemented from iptk::Gradient.

iptk::Image iptk::PrewittGradient::getVerticalGradient void   ) 
 

Returns the vertical gradient.


The image returned is different from the image registered. i.e, the resulting gradient image has its own memory space different from the registered image.

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

The function which does the actual gradient extraction.


The result of this function will be meaningful only after registering an image with the object of this class.

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