| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/image/imageedgedetector.h>

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 Color & | getBorderColor () 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 Image * | manipulate (Image *source, Image *target) |
| See `ImageManipulator'. Detects the edges in the source image. | |
| VRS_TYPEINFO (ImageEdgeDetector, ImageManipulator) | |
| 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.
| 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'. 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 | ||||
| ) |