Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgar::AbstractGradientImage Class Reference
[Gradients and Laplacians]

#include <qgarlib/AbstractGradientImage.H>

Inheritance diagram for qgar::AbstractGradientImage:

qgar::AbstractMultiImage qgar::CannyGradientImage qgar::DericheGradientImage List of all members.

Detailed Description

Base class to define gradient images.

A pixel of such an image represents a gradient value, i.e. a pair of floats corresponding to derivatives in x and y directions.

Warning:
This is an abstract class. It cannot be instantiated.
See also:
qgar::LocalGradientMaxima

Definition at line 74 of file AbstractGradientImage.H.

Public Types

Types
typedef float value_type
 Type of the elements stored in the pixmaps.
typedef value_typereference
 Reference to qgar::AbstractGradientImage::value_type.
typedef const value_typeconst_reference
 Constant reference to qgar::AbstractGradientImage::value_type.
typedef value_typepointer
 Pointer to qgar::AbstractGradientImage::value_type.
typedef const value_typeconst_pointer
 Constant pointer to qgar::AbstractGradientImage::value_type.

Public Member Functions

Destructor
virtual ~AbstractGradientImage ()
 Virtual destructor.
Access
FloatImage dxImg () const
 Get copy of x derivatives image.
const FloatImageaccessDxImg () const
 Get image of x derivatives.
FloatImage dyImg () const
 Get copy of y derivatives image.
const FloatImageaccessDyImg () const
 Get copy of y derivatives image.
float dxPixel (int aX, int aY) const
 Get x derivative value of a pixel.
float dyPixel (int aX, int aY) const
 Get y derivative value of a pixel.
float gradientModule (int aX, int aY) const
 Get the gradient module of a pixel.
Operators
AbstractGradientImageoperator= (const AbstractGradientImage &anImg)
 Assignment (same as copy constructor).
Copy the current image
AbstractGradientImage shallowCopy ()
 Shallow copy: The x and y pixel maps of the deritave images (qgar::AbstractGradientImage::_dxImg and qgar::AbstractGradientImage::_dyImg) of the given image are not duplicated.
Access to image characteristics
int width () const
 Get the image width.
int height () const
 Get the image height.

Protected Member Functions

Constructors
Constructors belong to the protected section so that the class cannot be instantiated.

 AbstractGradientImage ()
 Default constructor.
 AbstractGradientImage (const AbstractGradientImage &anImg)
 Copy constructor: Initialize from given gradient image.
 AbstractGradientImage (const GreyLevelImage &anImg)
 Initialize from given grey-level image.
 AbstractGradientImage (const FloatImage &anImg)
 Initialize from given float image.
 AbstractGradientImage (const DoubleImage &anImg)
 Initialize from given double image.
 AbstractGradientImage (int aWidth, int aHeight)
 Initialize using given width and height.
 AbstractGradientImage (int aWidth, int aHeight, FloatImage aDxImg, FloatImage aDyImg)
 Initialize from all data.

Protected Attributes

Representation of a gradient image
FloatImage _dxImg
 Image of x derivatives.
FloatImage _dyImg
 Image of y derivatives.
Representation of an image
int _width
 Width of the image.
int _height
 Height of the image.


Member Typedef Documentation

typedef const value_type* qgar::AbstractGradientImage::const_pointer
 

Constant pointer to qgar::AbstractGradientImage::value_type.

Reimplemented in qgar::CannyGradientImage.

Definition at line 112 of file AbstractGradientImage.H.

typedef const value_type& qgar::AbstractGradientImage::const_reference
 

Constant reference to qgar::AbstractGradientImage::value_type.

Reimplemented in qgar::CannyGradientImage.

Definition at line 102 of file AbstractGradientImage.H.

typedef value_type* qgar::AbstractGradientImage::pointer
 

Pointer to qgar::AbstractGradientImage::value_type.

Reimplemented in qgar::CannyGradientImage.

Definition at line 107 of file AbstractGradientImage.H.

typedef value_type& qgar::AbstractGradientImage::reference
 

Reference to qgar::AbstractGradientImage::value_type.

Reimplemented in qgar::CannyGradientImage.

Definition at line 97 of file AbstractGradientImage.H.

typedef float qgar::AbstractGradientImage::value_type
 

Type of the elements stored in the pixmaps.

Reimplemented in qgar::CannyGradientImage.

Definition at line 92 of file AbstractGradientImage.H.


Constructor & Destructor Documentation

virtual qgar::AbstractGradientImage::~AbstractGradientImage  )  [inline, virtual]
 

Virtual destructor.

Definition at line 129 of file AbstractGradientImage.H.

qgar::AbstractGradientImage::AbstractGradientImage  )  [protected]
 

Default constructor.

Definition at line 54 of file AbstractGradientImage.C.

Referenced by shallowCopy().

qgar::AbstractGradientImage::AbstractGradientImage const AbstractGradientImage anImg  )  [protected]
 

Copy constructor: Initialize from given gradient image.

Parameters:
anImg image to be copied
Warning:
Perform a deep copy: The x and y deritave images of the given multi-layered image are duplicated.

Definition at line 62 of file AbstractGradientImage.C.

qgar::AbstractGradientImage::AbstractGradientImage const GreyLevelImage anImg  )  [protected]
 

Initialize from given grey-level image.

Parameters:
anImg image to be copied into the x and y derivative pixel maps

Definition at line 71 of file AbstractGradientImage.C.

References _dxImg, _dyImg, qgar::AbstractMultiImage::_height, qgar::AbstractMultiImage::_width, and qgar::GenImage< T, CheckPolicy >::pPixMap().

qgar::AbstractGradientImage::AbstractGradientImage const FloatImage anImg  )  [protected]
 

Initialize from given float image.

Parameters:
anImg image to be copied into the x and y derivative pixel maps

Definition at line 95 of file AbstractGradientImage.C.

References _dxImg, _dyImg, qgar::AbstractMultiImage::_height, qgar::AbstractMultiImage::_width, and qgar::GenImage< T, CheckPolicy >::pPixMap().

qgar::AbstractGradientImage::AbstractGradientImage const DoubleImage anImg  )  [protected]
 

Initialize from given double image.

Parameters:
anImg image to be copied into the x and y derivative pixel maps

Definition at line 117 of file AbstractGradientImage.C.

References _dxImg, _dyImg, qgar::AbstractMultiImage::_height, qgar::AbstractMultiImage::_width, and qgar::GenImage< T, CheckPolicy >::pPixMap().

qgar::AbstractGradientImage::AbstractGradientImage int  aWidth,
int  aHeight
[protected]
 

Initialize using given width and height.

Parameters:
aWidth width of the image
aHeight height of the image

Definition at line 139 of file AbstractGradientImage.C.

qgar::AbstractGradientImage::AbstractGradientImage int  aWidth,
int  aHeight,
FloatImage  aDxImg,
FloatImage  aDyImg
[protected]
 

Initialize from all data.

Parameters:
aWidth width of the image
aHeight height of the image
aDxImg image of X derivatives
aDyImg image of Y derivatives

Definition at line 148 of file AbstractGradientImage.C.


Member Function Documentation

const FloatImage & qgar::AbstractGradientImage::accessDxImg  )  const [inline]
 

Get image of x derivatives.

Definition at line 339 of file AbstractGradientImage.H.

References _dxImg.

Referenced by qgar::GradientLocalMaxImage::GradientLocalMaxImage().

const FloatImage & qgar::AbstractGradientImage::accessDyImg  )  const [inline]
 

Get copy of y derivatives image.

Definition at line 351 of file AbstractGradientImage.H.

References _dyImg.

Referenced by qgar::GradientLocalMaxImage::GradientLocalMaxImage().

FloatImage qgar::AbstractGradientImage::dxImg  )  const [inline]
 

Get copy of x derivatives image.

Definition at line 333 of file AbstractGradientImage.H.

References _dxImg.

Referenced by qgar::GradientModuleImage::GradientModuleImage().

float qgar::AbstractGradientImage::dxPixel int  aX,
int  aY
const [inline]
 

Get x derivative value of a pixel.

Parameters:
aX X coordinate (column index) of the pixel
aY Y coordinate (row index) of the pixel

Definition at line 357 of file AbstractGradientImage.H.

References _dxImg, and qgar::GenImage< T, CheckPolicy >::pixel().

Referenced by gradientModule().

FloatImage qgar::AbstractGradientImage::dyImg  )  const [inline]
 

Get copy of y derivatives image.

Definition at line 345 of file AbstractGradientImage.H.

References _dyImg.

Referenced by qgar::GradientModuleImage::GradientModuleImage().

float qgar::AbstractGradientImage::dyPixel int  aX,
int  aY
const [inline]
 

Get y derivative value of a pixel.

Parameters:
aX X coordinate (column index) of the pixel
aY Y coordinate (row index) of the pixel

Definition at line 363 of file AbstractGradientImage.H.

References _dyImg, and qgar::GenImage< T, CheckPolicy >::pixel().

Referenced by gradientModule().

float qgar::AbstractGradientImage::gradientModule int  aX,
int  aY
const [inline]
 

Get the gradient module of a pixel.

Parameters:
aX X coordinate (column index) of the pixel
aY Y coordinate (row index) of the pixel

Definition at line 369 of file AbstractGradientImage.H.

References dxPixel(), and dyPixel().

int qgar::AbstractMultiImage::height  )  const [inline, inherited]
 

Get the image height.

Definition at line 191 of file AbstractMultiImage.H.

References qgar::AbstractMultiImage::_height.

AbstractGradientImage & qgar::AbstractGradientImage::operator= const AbstractGradientImage anImg  ) 
 

Assignment (same as copy constructor).

The current image is not supposed to initially have the same dimensions as the given image.

Parameters:
anImg image to assign to the current image
Warning:
Perform a deep copy: The x and y pixel maps of the deritave images (qgar::AbstractGradientImage::_dxImg and qgar::AbstractGradientImage::_dyImg) of the given image are duplicated.

Definition at line 165 of file AbstractGradientImage.C.

References _dxImg, _dyImg, and qgar::AbstractMultiImage::operator=().

AbstractGradientImage qgar::AbstractGradientImage::shallowCopy  )  [inline]
 

Shallow copy: The x and y pixel maps of the deritave images (qgar::AbstractGradientImage::_dxImg and qgar::AbstractGradientImage::_dyImg) of the given image are not duplicated.

See also:
qgar::AbstractGradientImage::operator= and copy constructor.
Warning:
When the copy is completed, the x and y pixel maps of the deritave images of the new image share their memory space with the pixel maps of the current image.

Definition at line 381 of file AbstractGradientImage.H.

References _dxImg, _dyImg, qgar::AbstractMultiImage::_height, qgar::AbstractMultiImage::_width, AbstractGradientImage(), and qgar::GenImage< T, CheckPolicy >::shallowCopy().

int qgar::AbstractMultiImage::width  )  const [inline, inherited]
 

Get the image width.

Definition at line 182 of file AbstractMultiImage.H.

References qgar::AbstractMultiImage::_width.


Member Data Documentation

FloatImage qgar::AbstractGradientImage::_dxImg [protected]
 

Image of x derivatives.

Definition at line 308 of file AbstractGradientImage.H.

Referenced by AbstractGradientImage(), accessDxImg(), qgar::DericheGradientImage::dfilterX(), dxImg(), dxPixel(), operator=(), qgar::CannyGradientImage::PRIVATE_CannyImage(), and shallowCopy().

FloatImage qgar::AbstractGradientImage::_dyImg [protected]
 

Image of y derivatives.

Definition at line 312 of file AbstractGradientImage.H.

Referenced by AbstractGradientImage(), accessDyImg(), qgar::DericheGradientImage::dfilterY(), dyImg(), dyPixel(), operator=(), qgar::CannyGradientImage::PRIVATE_CannyImage(), and shallowCopy().

int qgar::AbstractMultiImage::_height [protected, inherited]
 

Height of the image.

Definition at line 159 of file AbstractMultiImage.H.

Referenced by AbstractGradientImage(), qgar::DericheGradientImage::dfilterX(), qgar::DericheGradientImage::dfilterY(), qgar::AbstractMultiImage::height(), qgar::AbstractMultiImage::operator=(), and shallowCopy().

int qgar::AbstractMultiImage::_width [protected, inherited]
 

Width of the image.

Definition at line 154 of file AbstractMultiImage.H.

Referenced by AbstractGradientImage(), qgar::DericheGradientImage::dfilterX(), qgar::DericheGradientImage::dfilterY(), qgar::AbstractMultiImage::operator=(), shallowCopy(), and qgar::AbstractMultiImage::width().


The documentation for this class was generated from the following files: