OpenCV  3.0.0
Open Source Computer Vision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
cv::saliency::StaticSaliency Class Referenceabstract

#include "saliencyBaseClasses.hpp"

Inheritance diagram for cv::saliency::StaticSaliency:
cv::saliency::Saliency cv::Algorithm cv::saliency::StaticSaliencySpectralResidual

Public Member Functions

bool computeBinaryMap (const Mat &saliencyMap, Mat &binaryMap)
 This function perform a binary map of given saliency map. This is obtained in this way: More...
 
- Public Member Functions inherited from cv::saliency::Saliency
virtual ~Saliency ()
 Destructor. More...
 
bool computeSaliency (InputArray image, OutputArray saliencyMap)
 Compute the saliency. More...
 
String getClassName () const
 Get the name of the specific saliency type. More...
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 Reads algorithm parameters from a file storage. More...
 
virtual void save (const String &filename) const
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage. More...
 

Protected Member Functions

virtual bool computeSaliencyImpl (InputArray image, OutputArray saliencyMap)=0
 

Additional Inherited Members

- Static Public Member Functions inherited from cv::saliency::Saliency
static Ptr< Saliencycreate (const String &saliencyType)
 Create Saliency by saliency type. More...
 
- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file. More...
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String. More...
 
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node. More...
 
- Protected Attributes inherited from cv::saliency::Saliency
String className
 

Member Function Documentation

bool cv::saliency::StaticSaliency::computeBinaryMap ( const Mat saliencyMap,
Mat binaryMap 
)

This function perform a binary map of given saliency map. This is obtained in this way:

In a first step, to improve the definition of interest areas and facilitate identification of targets, a segmentation by clustering is performed, using K-means algorithm. Then, to gain a binary representation of clustered saliency map, since values of the map can vary according to the characteristics of frame under analysis, it is not convenient to use a fixed threshold. So, Otsu’s algorithm* is used, which assumes that the image to be thresholded contains two classes of pixels or bi-modal histograms (e.g. foreground and back-ground pixels); later on, the algorithm calculates the optimal threshold separating those two classes, so that their intra-class variance is minimal.

Parameters
saliencyMapthe saliency map obtained through one of the specialized algorithms
binaryMapthe binary map
virtual bool cv::saliency::StaticSaliency::computeSaliencyImpl ( InputArray  image,
OutputArray  saliencyMap 
)
protectedpure virtual

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