latest version v1.9 - last update 10 Apr 2010 |
Gevers and Stokman color edges. More...
#include <ltiColorEdgesGS.h>
Classes | |
class | parameters |
the parameters for the class colorEdgesGS More... | |
Public Member Functions | |
colorEdgesGS () | |
colorEdgesGS (const parameters &par) | |
colorEdgesGS (const colorEdgesGS &other) | |
virtual | ~colorEdgesGS () |
virtual const char * | getTypeName () const |
colorEdgesGS & | copy (const colorEdgesGS &other) |
colorEdgesGS & | operator= (const colorEdgesGS &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Gray valued images. | |
This methods are supplied for completeness, but since the algorithms are designed to work with color images, the results won't be good. Use the lti::cannyEdges functor instead. | |
virtual bool | apply (channel8 &srcdest) const |
virtual bool | apply (channel &srcdest) const |
virtual bool | apply (const channel8 &src, channel8 &dest) const |
virtual bool | apply (const channel &src, channel &dest) const |
virtual bool | apply (const channel &src, channel8 &dest) const |
Color Images | |
virtual bool | apply (image &srcdest) const |
virtual bool | apply (const image &src, image &dest) const |
virtual bool | apply (const image &src, channel8 &dest) const |
Protected Member Functions | |
bool | getGradients (const channel &red, const channel &green, const channel &blue, const channel &o1, const channel &o2, const channel &c1, const channel &c2, const float &stdDevR, const float &stdDevG, const float &stdDevB, const float &stdDevO1, const float &stdDevO2, const channel &stdDevC1, const channel &stdDevC2, channel &gradRGB, channel &stdDevRGB, channel &gradO1O2, channel &stdDevO1O2, channel &gradC1C2, channel &stdDevC1C2) const |
bool | constructUncertaintyKernels (sepKernel< float > &filterX, sepKernel< float > &filterY) const |
Gevers and Stokman color edges.
This functor implements the color edges detector described in:
Theo Gevers and Harro Stokman, "Classifying Color Edges in Video into Shadow-Geometry, Highlight or Material Transitions", IEEE Trans. on Multimedia, Vol. 5 No. 2, June 2003
Note that it is intended for color images only. If you use in on gray-valued image the results won't be good.
The edgeDetector::parameters::edgeValue attribute will be used to mark the material edges, which are usually the ones you really want to have.
This detector is in general slow, since it has to compute many color channels and gradients to classify the edges into material, highlight or shadow edges. If you are looking for a faster detector use the lti::cannyEdges functor, which uses the lti::colorContrastGradient to compute also edges of color images.
lti::colorEdgesGS::colorEdgesGS | ( | ) |
default constructor
lti::colorEdgesGS::colorEdgesGS | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::colorEdgesGS::colorEdgesGS | ( | const colorEdgesGS & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::colorEdgesGS::~colorEdgesGS | ( | ) | [virtual] |
destructor
Detect the edges in the given color image.
The edges will belong to one of three classes: material edge, highlight edge or shadow edge. Each one of them will be mark with the corresponding parameter value.
src | input color image | |
dest | detected edges |
Reimplemented from lti::edgeDetector.
Compute the edges for the given image.
src | input image | |
dest | colored edges |
Reimplemented from lti::edgeDetector.
virtual bool lti::colorEdgesGS::apply | ( | image & | srcdest | ) | const [virtual] |
Compute the edges for the given image and leave the result there too.
See apply(const image&, image&) for more details.
srcdest | input and output image. |
Reimplemented from lti::edgeDetector.
operates on a copy of the given parameters.
Reimplemented from lti::edgeDetector.
operates on a copy of the given parameters.
Reimplemented from lti::edgeDetector.
operates on a copy of the given parameters.
Reimplemented from lti::edgeDetector.
virtual bool lti::colorEdgesGS::apply | ( | channel & | srcdest | ) | const [virtual] |
operates on the given parameter.
srcdest | channel with the source data. The result will be left here too. |
Reimplemented from lti::edgeDetector.
virtual bool lti::colorEdgesGS::apply | ( | channel8 & | srcdest | ) | const [virtual] |
operates on the given parameter.
srcdest | channel8 with the source data. The result will be left here too. |
Reimplemented from lti::edgeDetector.
virtual functor* lti::colorEdgesGS::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::edgeDetector.
bool lti::colorEdgesGS::constructUncertaintyKernels | ( | sepKernel< float > & | filterX, | |
sepKernel< float > & | filterY | |||
) | const [protected] |
Compute the kernels necessary to compute the uncertainty of the gradient.
colorEdgesGS& lti::colorEdgesGS::copy | ( | const colorEdgesGS & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::edgeDetector.
bool lti::colorEdgesGS::getGradients | ( | const channel & | red, | |
const channel & | green, | |||
const channel & | blue, | |||
const channel & | o1, | |||
const channel & | o2, | |||
const channel & | c1, | |||
const channel & | c2, | |||
const float & | stdDevR, | |||
const float & | stdDevG, | |||
const float & | stdDevB, | |||
const float & | stdDevO1, | |||
const float & | stdDevO2, | |||
const channel & | stdDevC1, | |||
const channel & | stdDevC2, | |||
channel & | gradRGB, | |||
channel & | stdDevRGB, | |||
channel & | gradO1O2, | |||
channel & | stdDevO1O2, | |||
channel & | gradC1C2, | |||
channel & | stdDevC1C2 | |||
) | const [protected] |
Get gradient modula and uncertainty values for each one of them.
const parameters& lti::colorEdgesGS::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::edgeDetector.
virtual const char* lti::colorEdgesGS::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("colorEdgesGS")
Reimplemented from lti::edgeDetector.
colorEdgesGS& lti::colorEdgesGS::operator= | ( | const colorEdgesGS & | other | ) |
alias for copy member
other | the functor to be copied |
Reimplemented from lti::edgeDetector.