LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::guyMedioniSaliency Class Reference

The Guy-Medioni saliency is a procedure for perceptual grouping of low level features like points and edges. More...

#include <ltiGuyMedioniSaliency.h>

Inheritance diagram for lti::guyMedioniSaliency:
Inheritance graph
[legend]
Collaboration diagram for lti::guyMedioniSaliency:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class guyMedioniSaliency More...

Public Member Functions

 guyMedioniSaliency ()
 guyMedioniSaliency (const parameters &par)
 guyMedioniSaliency (const guyMedioniSaliency &other)
virtual ~guyMedioniSaliency ()
virtual const char * getTypeName () const
bool apply (const channel &edgeRelevance, const channel &orientation, channel &saliencyLambdaX, channel &saliencyLambdaY)
bool apply (const channel &edgeRelevance, const channel &orientation, channel &saliency)
bool apply (const channel &edgeRelevance, const channel &orientation, channel &saliency, channel &angle, float &maxSaliency)
const matrix< float > & getExtensionFieldX () const
const matrix< float > & getExtensionFieldY () const
const matrix< float > & getExtensionFieldM () const
guyMedioniSaliencycopy (const guyMedioniSaliency &other)
guyMedioniSaliencyoperator= (const guyMedioniSaliency &other)
virtual functorclone () const
const parametersgetParameters () const
virtual bool updateParameters ()

Protected Member Functions

void accumulate (const channel &edgeRelevance, const channel &orientation, const float threshold)
void getSaliency (channel &salLambdaMax, channel &salLambdaMin)
void getSaliency (channel &sal)
void getSaliency (channel &sal, channel &angle, float &maxSaliency)

Protected Attributes

arctanLUT atan2
Saliency Accumulators

Six accumulators are necessary to compute the saliency



matrix< float > sumx2
matrix< float > sumy2
matrix< float > sumxy

Extension Field



matrix< float > extensionFieldX
matrix< float > extensionFieldY
matrix< float > extensionFieldM
bilinearInterpolator< float > ifieldX
bilinearInterpolator< float > ifieldY
point extFieldCenter
int extFieldRadius
imatrix extFieldCircle
float fieldThreshold
bool generateExtensionField ()
void vote (const point p, const float angle, const float weight)

Detailed Description

The Guy-Medioni saliency is a procedure for perceptual grouping of low level features like points and edges.

For this task it computes first a extension field, an based on it a saliency map, where only perceptual relevant features survive, or illusory ones appear.

As input it expects the output of an orientation map, with a relevance channel and an orientation channel. The relevance can be replaced by an edge map. With a threshold-parameter you can decide how much relevant a pixel must be in order to be considered in the saliency map.

The original theory can be found in:

G. Guy and G. Medioni. "Inferring global perceptual contours from local features" International Journal of Computer Vision, Vol.20, No.1/2, 1996, pp. 113-133

http://citeseer.nj.nec.com/guy96inferring.html

Example:

 lti::image img;
 lti::channel chnl,rel,ori;
 lti::channel sal,sala;
 lti::channel8 rel8;
 float maxSal;

 // load an image (suppose you have one in the directory ../img/ called
 //                image1.bmp)
 lti::loadImage loader;
 loader.load("../img/image1.bmp",img);
 chnl.castFrom(img); // convert the color image into a gray valued one

 // get the edges and orientation channels
 lti::cannyEdges canny;
 canny.apply(chnl,rel8,ori);
 rel.castFrom(rel8);

 // get the Guy-Medioni saliency (sal) and the orientation (sala)
 // and the maximal value found in the sal channel (maxSal).
 lti::guyMedioniSaliency gmSaliency;
 gmSaliency.apply(rel,ori,sal,sala,maxSal);

The saliency channel is somehow blurred. You can use the lti::nonMaximaSuppression to get again an edge channel from the saliency:

 lti::channel8 newEdges;
 lti::nonMaximaSuppression suppressor;
 suppressor.apply(sal,sala,newEdges,maxSal);

Constructor & Destructor Documentation

lti::guyMedioniSaliency::guyMedioniSaliency (  ) 

default constructor

lti::guyMedioniSaliency::guyMedioniSaliency ( const parameters par  ) 

Construct a functor using the given parameters.

lti::guyMedioniSaliency::guyMedioniSaliency ( const guyMedioniSaliency other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::guyMedioniSaliency::~guyMedioniSaliency (  )  [virtual]

destructor


Member Function Documentation

void lti::guyMedioniSaliency::accumulate ( const channel edgeRelevance,
const channel orientation,
const float  threshold 
) [protected]

compute the first step of the saliency, accumulating the fields of each edge-element.

bool lti::guyMedioniSaliency::apply ( const channel edgeRelevance,
const channel orientation,
channel saliency,
channel angle,
float &  maxSaliency 
)

Generates the enhanced saliency measure.

This method is more efficient than to compute both lambda channels with the alternative apply() method and to subtract them.

Parameters:
edgeRelevance Relevance for each pixel. It can be an edge image.
orientation Orientation of each pixel. Please note that the orientation channel expected by this functor contains the angle perpendicular to the edgels as returned by the gradient or orientationMap functors.
saliency resulting saliency channel.
angle resulting direction for each pixel
maxSaliency maximum saliency value.
Returns:
true if apply successful or false otherwise.
Warning:
The orientation channel expected differs from the one returned by orientation map functors. It must represent the real direction of the edgels instead of the direction perpendicular to them.
bool lti::guyMedioniSaliency::apply ( const channel edgeRelevance,
const channel orientation,
channel saliency 
)

Generates the enhanced saliency measure.

This method is more efficient than to compute both lambda channels with the alternative apply() method and to subtract them.

Parameters:
edgeRelevance Relevance for each pixel. It can be an edge image.
orientation Orientation of each pixel. Please note that the orientation channel expected by this functor contains the angle perpendicular to the edgels as returned by the gradient or orientationMap functors.
saliency resulting saliency channel.
Returns:
true if apply successful or false otherwise.
Warning:
The orientation channel expected differs from the one returned by orientation map functors. It must represent the real direction of the edgels instead of the direction perpendicular to them.
bool lti::guyMedioniSaliency::apply ( const channel edgeRelevance,
const channel orientation,
channel saliencyLambdaX,
channel saliencyLambdaY 
)

Generates the raw saliency and junction saliency maps using Guy-Medioni's approach.

To obtain the final saliency it is more efficient to use the alternative apply() method than to subtract both lambda channels.

Parameters:
edgeRelevance Relevance for each pixel. It can be an edge image.
orientation Orientation of each pixel. Please note that the orientation channel expected by this functor contains the angle perpendicular to the edgels as returned by the gradient or orientationMap functors.
saliencyLambdaX resulting major eigenvalue: raw saliency.
saliencyLambdaY resulting minor eigenvalues: junction saliency.
Returns:
true if apply successful or false otherwise.
virtual functor* lti::guyMedioniSaliency::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

guyMedioniSaliency& lti::guyMedioniSaliency::copy ( const guyMedioniSaliency other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

bool lti::guyMedioniSaliency::generateExtensionField (  )  [protected]

generate extension field

Based on the parameters object, a "kernel" oriented with 0 degrees will be constructed.

const matrix<float>& lti::guyMedioniSaliency::getExtensionFieldM (  )  const

Return a read only copy of the magnitude of the extension field.

The returned field component will be updated after setParameters().

const matrix<float>& lti::guyMedioniSaliency::getExtensionFieldX (  )  const

Return a read only copy of the x component of the extension field.

The returned field component will be updated after setParameters().

const matrix<float>& lti::guyMedioniSaliency::getExtensionFieldY (  )  const

Return a read only copy of the y component of the extension field.

The returned field component will be updated after setParameters().

const parameters& lti::guyMedioniSaliency::getParameters (  )  const

returns used parameters

Reimplemented from lti::modifier.

void lti::guyMedioniSaliency::getSaliency ( channel sal,
channel angle,
float &  maxSaliency 
) [protected]

From the accumulated members compute the saliency components.

void lti::guyMedioniSaliency::getSaliency ( channel sal  )  [protected]

From the accumulated members compute the saliency components.

void lti::guyMedioniSaliency::getSaliency ( channel salLambdaMax,
channel salLambdaMin 
) [protected]

From the accumulated members compute the saliency components.

virtual const char* lti::guyMedioniSaliency::getTypeName (  )  const [virtual]

returns the name of this type ("guyMedioniSaliency")

Reimplemented from lti::modifier.

guyMedioniSaliency& lti::guyMedioniSaliency::operator= ( const guyMedioniSaliency other  ) 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

virtual bool lti::guyMedioniSaliency::updateParameters (  )  [virtual]

Update functor's parameters.

This member updates the internal fields according to the values set in the parameters.

Returns:
true if successful, false otherwise

Reimplemented from lti::functor.

void lti::guyMedioniSaliency::vote ( const point  p,
const float  angle,
const float  weight 
) [protected]

Accumulate the extension field components on the saliency map considering the given position, angle and weight.

The saliency fields must be previously initialized


Member Data Documentation

Look up table for sin values.

Look up table for cos values LUT to compute the arc tangent

Magnitude of the extension field currently used.

x component of the extension field currently used

y component of the extension field currently used

Center of the extension field.

Matrix containing the ioPoints of a circle covering the relevant extension field.

Extension field radius.

Threshold for the extension field magnitude.

interpolator for extensionFieldX

interpolator for extensionFieldY

sum of the x^2 components

sum of the xy components

sum of the y^2 components


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

Generated on Sat Apr 10 15:27:23 2010 for LTI-Lib by Doxygen 1.6.1