saliency_categories.rst 2.1 KB
Newer Older
jaco's avatar
jaco committed
1 2 3 4 5
Saliency categories
============================

.. highlight:: cpp

jaco's avatar
jaco committed
6 7 8 9 10
Base classes which give a general interface for each specialized type of saliency algorithm and provide utility methods for each algorithm in its class.

StaticSaliency
--------------

jaco's avatar
jaco committed
11
.. ocv:class:: StaticSaliency
jaco's avatar
jaco committed
12 13 14

StaticSaliency class::

jaco's avatar
jaco committed
15
   class CV_EXPORTS StaticSaliency : public virtual Saliency
jaco's avatar
jaco committed
16 17 18 19 20 21 22 23 24 25
   {
    public:

     bool computeBinaryMap( const Mat& saliencyMap, Mat& binaryMap );

    protected:
     virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap ) = 0;
   };

StaticSaliency::computeBinaryMap
jaco's avatar
jaco committed
26
--------------------------------
jaco's avatar
jaco committed
27 28 29 30 31 32 33 34

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.

jaco's avatar
jaco committed
35
.. ocv:function:: bool computeBinaryMap( const Mat& saliencyMap, Mat& binaryMap )
jaco's avatar
jaco committed
36 37

   :param saliencyMap: the saliency map obtained through one of the specialized algorithms
jaco's avatar
jaco committed
38
   :param binaryMap: the binary map
jaco's avatar
jaco committed
39 40 41 42 43 44 45 46 47


MotionSaliency
--------------

.. ocv:class:: MotionSaliency

MotionSaliency class::

jaco's avatar
jaco committed
48
   class CV_EXPORTS MotionSaliency : public virtual Saliency
jaco's avatar
jaco committed
49 50 51 52 53 54 55 56 57
   {


    protected:
     virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap ) = 0;
   };


Objectness
jaco's avatar
jaco committed
58
----------
jaco's avatar
jaco committed
59 60 61 62 63

.. ocv:class:: Objectness

Objectness class::

jaco's avatar
jaco committed
64
   class CV_EXPORTS Objectness : public virtual Saliency
jaco's avatar
jaco committed
65 66 67 68 69 70 71
   {

    protected:
     virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap ) = 0;
   };


jaco's avatar
jaco committed
72