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

iptk::SobelGradient Class Reference

#include <sobelGradient.h>

Inheritance diagram for iptk::SobelGradient:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Class to perform a Sobel's gradient extraction.


The algorithm for the Sobels'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

 SobelGradient (void)
 Default Constructor.

 SobelGradient (const Image &im)
 Image registering constructor.

 SobelGradient (const SobelGradient &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::SobelGradient::SobelGradient void   ) 
 

Default Constructor.


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

iptk::SobelGradient::SobelGradient const Image im  ) 
 

Image registering constructor.

The image is automatically registered at the construction stage.

iptk::SobelGradient::SobelGradient const SobelGradient 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::SobelGradient::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::SobelGradient::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::SobelGradient::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::SobelGradient::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