latest version v1.9 - last update 10 Apr 2010 |
The Susan Edge Detector. More...
#include <ltiSusanEdges.h>
Classes | |
class | parameters |
Parameter class for susanEdges. More... | |
Public Member Functions | |
susanEdges () | |
susanEdges (const parameters &par) | |
susanEdges (const susanEdges &other) | |
virtual | ~susanEdges () |
virtual const char * | getTypeName () const |
virtual functor * | clone () const |
virtual bool | updateParameters () |
const parameters & | getParameters () const |
virtual bool | apply (channel &srcdest) const |
virtual bool | apply (channel8 &srcdest) const |
virtual bool | apply (image &srcdest) const |
virtual bool | apply (const channel &src, channel &dest) const |
virtual bool | apply (const channel &src, channel8 &dest) const |
virtual bool | apply (const channel8 &src, channel8 &dest) const |
virtual bool | apply (const image &src, image &dest) const |
virtual bool | apply (const image &src, channel8 &dest) const |
The Susan Edge Detector.
susanEdges is a modifier-frontend for the susan-class for edge detection. The susan-principle is a fast method for finding binary edges in images and channels. The result is a black-and-white map (image or channel format), where white pixels (255) mark an edge and black pixels (0) are background area. in General, the sensitivity es controlled by the parameter threshold
, which is an unsigned integer between 1 and 255, where small thresholds produce many edges and high thresholds detect only rough edges. The default is 20.
Example:
lti::image theimage; lti::channel8 RED, GREEN, BLUE; // to store the results: lti::image edgeImage; lti::chanel8 edgeChannel; // ... // load image, split into channel8's lti::susanEdges detect; lti::susanEdges::parameters detectparams; // default parameters are: RGBmerge, threshold = 20... detectparams.edgeMerge = lti::susanEdges::parameters::RGBseparate; detectparams.threshold = 15; detect.setParameters(detectparams); // choose one of these: detect.apply(theimage, edgeImage); // on copy for images detect.apply(theimage); // on place for image detect.apply(RED, edgeChannel); // on copy for channel8's detect.apply(RED); // on place for channel8 detect.apply(theimage, edgechannel); // on copy for input image and output channel8
lti::susanEdges::susanEdges | ( | ) |
constructor
lti::susanEdges::susanEdges | ( | const parameters & | par | ) |
constructor with parameters
lti::susanEdges::susanEdges | ( | const susanEdges & | other | ) |
copy constructor
virtual lti::susanEdges::~susanEdges | ( | ) | [virtual] |
destructor
Compute the edges for the red, green and blue components of the image and leave the sum of the results in the given channel.
Note that if you give as parameters::edgeValue or parameters::noEdgeValue values greater than 255/3, you can have some overflow effects on the resulting channel.
Reimplemented from lti::edgeDetector.
Compute the edges for the red, green and blue components of the image and leave the result in each channel of the destination image.
Reimplemented from lti::edgeDetector.
operates on a copy of the given lti::channel8 input.
src | lti::channel8 with the source data. | |
dest | lti::channel8, where the binary edge will be left. |
susanError | is thrown if the parameters are out of range. |
Reimplemented from lti::edgeDetector.
operates on a copy of the given parameters.
Reimplemented from lti::edgeDetector.
operates on a copy of the given parameters (channel)
Reimplemented from lti::edgeDetector.
virtual bool lti::susanEdges::apply | ( | image & | srcdest | ) | const [virtual] |
Compute the edges for the red, green and blue components of the image and leave the result in each channel of image.
srcdest | image with the source data. The result will be left here too. |
Reimplemented from lti::edgeDetector.
virtual bool lti::susanEdges::apply | ( | channel8 & | srcdest | ) | const [virtual] |
OnPlace version of apply for lti::channel8 data.
srcdest | channel8 with the source data. The resulting edge will be left here too. |
susanError | is thrown if the parameters are out of range. |
Reimplemented from lti::edgeDetector.
virtual bool lti::susanEdges::apply | ( | channel & | srcdest | ) | const [virtual] |
OnPlace version of apply for channels (lti::channel8).
srcdest | channel with the source data. The result will be left here too. |
Reimplemented from lti::edgeDetector.
virtual functor* lti::susanEdges::clone | ( | ) | const [virtual] |
clone member
Implements lti::edgeDetector.
const parameters& lti::susanEdges::getParameters | ( | ) | const |
returns current parameters.
Reimplemented from lti::edgeDetector.
virtual const char* lti::susanEdges::getTypeName | ( | ) | const [virtual] |
returns the type of the object
Reimplemented from lti::edgeDetector.
virtual bool lti::susanEdges::updateParameters | ( | ) | [virtual] |
set the susanEdges::parameters.
Reimplemented from lti::functor.