version 3.3

VRS::ImageEdgeDetector Class Reference

Detects the edges of an image and stores them in another image. More...

#include <vrs/image/imageedgedetector.h>

Inheritance diagram for VRS::ImageEdgeDetector:

VRS::ImageManipulator VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 ImageEdgeDetector (bool extendSource=false, const Color &borderColor=Color(0.0, 0.0, 0.0, 0.0), bool trimToWhite=false, double border=0.0)
void setExtendSource (bool extend)
 Set the extendSource flag.
bool getExtendSource () const
 Returns the extendSource flag.
void setBorderColor (const Color &color)
 Sets the borderColor.
const ColorgetBorderColor () const
 Returns the borderColor.
void setTrimToWhite (bool ttw)
 Sets the trimToWhite flag.
bool getTrimToWhite () const
 Returns the trimToWhite flag.
void setBorder (double border)
 Sets the border value.
double getBorder () const
 Returns the border value.
virtual bool operatesInPlace () const
 See `ImageManipulator'.
virtual Imagemanipulate (Image *source, Image *target)
 See `ImageManipulator'. Detects the edges in the source image.
 VRS_TYPEINFO (ImageEdgeDetector, ImageManipulator)


Detailed Description

Detects the edges of an image and stores them in another image.

Constructor & Destructor Documentation

VRS::ImageEdgeDetector::ImageEdgeDetector ( bool  extendSource = false,
const Color borderColor = Color(0.0, 0.0, 0.0, 0.0),
bool  trimToWhite = false,
double  border = 0.0 
)

The manipulator will detect edges in the source image (using the sobel matrices) and store them in the target image. If extendSource is set, the source image is extended by one pixel of borderColor in each direction (top, down, left and right) to detect edges at the edges of the image. If trimToWhite is set, all pixels in the target image will be either black or white. The value, the brightness of a pixel must have at least, is determinded by border (from [0,1]). If border is 0 and the trimToWhite flag is set, every non-black pixel will be made white.


Member Function Documentation

void VRS::ImageEdgeDetector::setExtendSource ( bool  extend  ) 

Set the extendSource flag.

If extendSource is set, the source image is extended by one pixel of borderColor in each direction (top, down, left and right) to detect edges at the edges of the image.

bool VRS::ImageEdgeDetector::getExtendSource (  )  const

Returns the extendSource flag.

void VRS::ImageEdgeDetector::setBorderColor ( const Color color  ) 

Sets the borderColor.

The borderColor is only relevant, if the extendSource flag is set. The source image will be extended by pixels of borderColor. See also setExtendSource.

const Color& VRS::ImageEdgeDetector::getBorderColor (  )  const

Returns the borderColor.

void VRS::ImageEdgeDetector::setTrimToWhite ( bool  ttw  ) 

Sets the trimToWhite flag.

If trimToWhite is set true, all pixels in the target image will be either black or white. See also set/getBorder

bool VRS::ImageEdgeDetector::getTrimToWhite (  )  const

Returns the trimToWhite flag.

void VRS::ImageEdgeDetector::setBorder ( double  border  ) 

Sets the border value.

The border value is only relevant, if the trimToWhite flag is set. Border determines, which pixels are considered white and which black. If the intensity of a pixel is bigger than border or equal to border, it is considered white, else black.

double VRS::ImageEdgeDetector::getBorder (  )  const

Returns the border value.

virtual bool VRS::ImageEdgeDetector::operatesInPlace (  )  const [virtual]

See `ImageManipulator'.

Reimplemented from VRS::ImageManipulator.

virtual Image* VRS::ImageEdgeDetector::manipulate ( Image source,
Image target 
) [virtual]

See `ImageManipulator'. Detects the edges in the source image.

Detects the edges in the source image (as described in the constructor) and stores them in the target image. Edges will be detected in the source's ROI and be copied into the target's ROI. The algorithm will convert any layer constellation, so you do not have to worry about that. (Remark: So edges will also appear in the forth, i.e. alpha, layer, if there is one!)

Implements VRS::ImageManipulator.

VRS::ImageEdgeDetector::VRS_TYPEINFO ( ImageEdgeDetector  ,
ImageManipulator   
)


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

Generated on Mon May 21 06:00:18 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact