documentation finished

pull/39/head
jaco 10 years ago
parent 6aff2d878c
commit ccde01a671
  1. 42
      modules/saliency/.cproject
  2. 27
      modules/saliency/.project
  3. 20
      modules/saliency/doc/common_interfaces_saliency.rst
  4. 67
      modules/saliency/doc/common_interfaces_saliency.rst~
  5. 2
      modules/saliency/doc/misc
  6. 9
      modules/saliency/doc/motion_saliency_algorithms.rst~
  7. 73
      modules/saliency/doc/objectness_algorithms.rst
  8. 5
      modules/saliency/doc/objectness_algorithms.rst~
  9. BIN
      modules/saliency/doc/pics/Saliency.png
  10. BIN
      modules/saliency/doc/pics/saliency.png
  11. 8
      modules/saliency/doc/saliency.rst
  12. 52
      modules/saliency/doc/saliency.rst~
  13. 34
      modules/saliency/doc/saliencyAPI.rst~
  14. 8
      modules/saliency/doc/saliency_categories.rst
  15. 72
      modules/saliency/doc/saliency_categories.rst~
  16. 42
      modules/saliency/doc/static_saliency_algorithms.rst
  17. 43
      modules/saliency/doc/static_saliency_algorithms.rst~
  18. 1
      modules/saliency/doc/uml
  19. 17
      modules/saliency/include/opencv2/saliency/saliencySpecializedClasses.hpp
  20. 4
      modules/saliency/src/BING/objectnessBING.cpp

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.663614435">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.663614435" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.663614435" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.663614435.1254677813" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.1064573876" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1890347372" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
<builder id="cdt.managedbuild.target.gnu.builder.base.442509792" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.base"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.373657512" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.802846068" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.749429962" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/>
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1309904927" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1236829305" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.base.825838949" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="saliency.null.730009995" name="saliency"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
</cproject>

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>saliency</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

@ -1,11 +1,11 @@
Common Interfaces of Saliency
============================
=============================
.. highlight:: cpp
Saliency : Algorithm
-------------------
--------------------
.. ocv:class:: Saliency
@ -26,11 +26,11 @@ Base abstract class for Saliency algorithms::
Saliency::create
---------------
----------------
Creates a specialized saliency algorithm by its name.
.. ocv:function:: static Ptr<Saliency> create( const String& saliencyType );
.. ocv:function:: static Ptr<Saliency> Saliency::create( const String& saliencyType )
:param saliencyType: saliency Type
@ -42,21 +42,21 @@ The following saliency types are now supported:
Saliency::computeSaliency
------------------------
-------------------------
Performs all the operations, according to the specific algorithm created, to obtain the saliency map.
.. ocv:function:: bool computeSaliency( const InputArray image, OutputArray saliencyMap );
.. ocv:function:: bool Saliency::computeSaliency( const InputArray image, OutputArray saliencyMap )
:param image: image or set of input images. According to InputArray proxy and to the needs of different algorithms (currently plugged), the param image may be Mat or vector<Mat>
:param saliencyMap: saliency map. According to OutputArray proxy and to the results given by different algorithms (currently plugged), the saliency map may be a Mat or vector<Vec4i> (BING results).
:param image: image or set of input images. According to InputArray proxy and to the needs of different algorithms (currently plugged), the param image may be *Mat* or *vector<Mat>*
:param saliencyMap: saliency map. According to OutputArray proxy and to the results given by different algorithms (currently plugged), the saliency map may be a *Mat* or *vector<Vec4i>* (BING results).
Saliency::getClassName
---------------------
----------------------
Get the name of the specific Saliency Algorithm.
.. ocv:function:: String getClassName() const;
.. ocv:function:: String Saliency::getClassName() const

@ -1,67 +0,0 @@
Common Interfaces of Saliency
============================
.. highlight:: cpp
Saliency : Algorithm
-------------------
.. ocv:class:: Saliency
Base abstract class for Saliency algorithms::
class CV_EXPORTS_W Saliency : public virtual Algorithm
{
public:
virtual ~Saliency();
static Ptr<Saliency> create( const String& saliencyType );
bool computeSaliency( const InputArray image, OutputArray saliencyMap );
String getClassName() const;
};
Saliency::create
---------------
Creates a specialized saliency algorithm by its name.
.. ocv:function:: static Ptr<Saliency> create( const String& saliencyType );
:param saliencyType: saliency Type
The following saliency types are now supported:
* ``"SPECTRAL_RESIDUAL"`` -- :ocv:class:`StaticSaliencySpectralResidual`
* ``"BING"`` -- :ocv:class:`ObjectnessBING`
Saliency::computeSaliency
------------------------
Performs all the operations, according to the specific algorithm created, to obtain the saliency map.
.. ocv:function:: bool computeSaliency( const InputArray image, OutputArray saliencyMap );
:param image: image or set of input images. According to InputArray proxy and to the needs of different algorithms (currently plugged), the param image may be Mat or vector<Mat>
:param saliencyMap: saliency map. According to OutputArray proxy and to the results given by different algorithms (currently plugged), the saliency map may be a Mat or vector<Vec4i> (BING results).
Saliency::getClassName
---------------------
Get the name of the specific Saliency Algorithm.
.. ocv:function:: String getClassName() const;

@ -1 +1 @@
Subproject commit 14511ac1cc8564e1aee153efae4bf0453d3e645e
Subproject commit 16789e8dcad170f502c81ea2b9714a4dd6bff0c1

@ -1,9 +0,0 @@
Motion Saliency Algorithms
============================
.. highlight:: cpp
Algorithms belonging to this category, are particularly focused to detect salient objects over time (hence also over frame), then there is a temporal component sealing cosider that allows to detect "moving" objects as salient, meaning therefore also the more general sense of detection the changes in the scene.

@ -5,5 +5,78 @@ Objectness Algorithms
Objectness is usually represented as a value which reflects how likely an image window covers an object of any category. Algorithms belonging to this category, avoid making decisions early on, by proposing a small number of category-independent proposals, that are expected to cover all objects in an image. Being able to perceive objects before identifying them is closely related to bottom up visual attention (saliency)
Presently, the Binarized normed gradients algorithm [BING]_ has been implemented.
.. [BING] Cheng, Ming-Ming, et al. "BING: Binarized normed gradients for objectness estimation at 300fps." IEEE CVPR. 2014.
ObjectnessBING
--------------
.. ocv:class:: ObjectnessBING
Implementation of BING from :ocv:class:`Objectness`::
class CV_EXPORTS_W ObjectnessBING : public Objectness
{
public:
ObjectnessBING();
~ObjectnessBING();
void read();
void write() const;
vector<float> getobjectnessValues();
void setTrainingPath( string trainingPath );
void setBBResDir( string resultsDir );
protected:
bool computeSaliencyImpl( const InputArray src, OutputArray dst );
};
ObjectnessBING::ObjectnessBING
------------------------------
Constructor
.. ocv:function:: ObjectnessBING::ObjectnessBING()
ObjectnessBING::getobjectnessValues
-----------------------------------
Return the list of the rectangles' objectness value, in the same order as the *vector<Vec4i> objectnessBoundingBox* returned by the algorithm (in computeSaliencyImpl function).
The bigger value these scores are, it is more likely to be an object window.
.. ocv:function:: vector<float> ObjectnessBING::getobjectnessValues()
ObjectnessBING::setTrainingPath
--------------------------------
This is a utility function that allows to set the correct path from which the algorithm will load the trained model.
.. ocv:function:: void ObjectnessBING::setTrainingPath( string trainingPath )
:param trainingPath: trained model path
ObjectnessBING::setBBResDir
---------------------------
This is a utility function that allows to set an arbitrary path in which the algorithm will save the optional results
(ie writing on file the total number and the list of rectangles returned by objectess, one for each row).
.. ocv:function:: void ObjectnessBING::setBBResDir( string resultsDir )
:param setBBResDir: results' folder path
ObjectnessBING::computeSaliencyImpl
-----------------------------------
Performs all the operations and calls all internal functions necessary for the accomplishment of the Binarized normed gradients algorithm.
.. ocv:function:: bool ObjectnessBING::computeSaliencyImpl( const InputArray image, OutputArray objectnessBoundingBox )
:param image: input image. According to the needs of this specialized algorithm, the param image is a single *Mat*
:param saliencyMap: objectness Bounding Box vector. According to the result given by this specialized algorithm, the objectnessBoundingBox is a *vector<Vec4i>*.
Each bounding box is represented by a *Vec4i* for (minX, minY, maxX, maxY).

@ -1,5 +0,0 @@
Objectness Algorithms
============================
.. highlight:: cpp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 70 KiB

@ -31,15 +31,9 @@ To see how API works, try tracker demo: https://github.com/fpuja/opencv_contrib/
.. note:: This Tracking API has been designed with PlantUML. If you modify this API please change UML files under modules/tracking/misc/
The following reference was used in the API
.. [SR] Hou, Xiaodi, and Liqing Zhang. "Saliency detection: A spectral residual approach." Computer Vision and Pattern Recognition, 2007. CVPR'07. IEEE Conference on. IEEE, 2007.
.. [BING] Cheng, Ming-Ming, et al. "BING: Binarized normed gradients for objectness estimation at 300fps." IEEE CVPR. 2014.
Saliency classes:
----------------
-----------------
.. toctree::
:maxdepth: 2

@ -1,52 +0,0 @@
Saliency API
============
.. highlight:: cpp
Many computer vision applications may benefit from understanding where humans focus given a scene. Other than cognitively understanding the way human perceive images and scenes, finding salient regions and objects in the images helps various tasks such as speeding up object detection, object recognition, object tracking and content-aware image editing.
About the saliency, there is a rich literature but the development is very fragmented. The principal purpose of this API is to give a
unique interface, a unique framework for use and plug sever saliency algorithms, also with very different nature and methodology, but they share the same purpose, organizing algorithms into three main categories:
**Static Saliency**: algorithms belonging to this category, exploit different image features that allow to detect salient objects in a non dynamic scenarios.
**Motion Saliency**: algorithms belonging to this category, are particularly focused to detect salient objects over time (hence also over frame), then there is a temporal component sealing cosider that allows to detect "moving" objects as salient, meaning therefore also the more general sense of detection the changes in the scene.
**Objectness**: Objectness is usually represented as a value which reflects how likely an image window covers an object of any category. Algorithms belonging to this category, avoid making decisions early on, by proposing a small number of category-independent proposals, that are expected to cover all objects in an image. Being able to perceive objects before identifying them is closely related to bottom up visual attention (saliency).
UML design:
-----------
**Saliency diagram**
.. image:: pics/saliency.png
:width: 80%
:alt: Saliency diagram
:align: center
To see how API works, try tracker demo: https://github.com/fpuja/opencv_contrib/blob/saliencyModuleDevelop/modules/saliency/samples/computeSaliency.cpp
.. note:: This Tracking API has been designed with PlantUML. If you modify this API please change UML files under modules/tracking/misc/
The following reference was used in the API
.. [SR] Hou, Xiaodi, and Liqing Zhang. "Saliency detection: A spectral residual approach." Computer Vision and Pattern Recognition, 2007. CVPR'07. IEEE Conference on. IEEE, 2007.
.. [BING] Cheng, Ming-Ming, et al. "BING: Binarized normed gradients for objectness estimation at 300fps." IEEE CVPR. 2014.
Saliency classes:
----------------
.. toctree::
:maxdepth: 2
saliency_categories
static_saliency_algorithms
motion_saliency_algorithms
objectness_algorithms

@ -1,34 +0,0 @@
Saliency API
============
.. highlight:: cpp
UML design:
-----------
**Saliency diagram**
.. image:: pics/saliency.png
:width: 80%
:alt: Tracker diagram
:align: center
To see how API works, try tracker demo:
.. note:: This Tracking API has been designed with PlantUML. If you modify this API please change UML files under modules/tracking/misc/
The following reference was used in the API
.. [SR] Hou, Xiaodi, and Liqing Zhang. "Saliency detection: A spectral residual approach." Computer Vision and Pattern Recognition, 2007. CVPR'07. IEEE Conference on. IEEE, 2007.
.. [BING] Cheng, Ming-Ming, et al. "BING: Binarized normed gradients for objectness estimation at 300fps." IEEE CVPR. 2014.
Saliency classes:
----------------
.. toctree::
:maxdepth: 2

@ -23,7 +23,7 @@ StaticSaliency class::
};
StaticSaliency::computeBinaryMap
-------------------------------
--------------------------------
This function perform a binary map of given saliency map. This is obtained in this way:
@ -32,10 +32,10 @@ by clustering is performed, using *K-means algorithm*. Then, to gain a binary re
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.
.. ocv:function:: bool computeBinaryMap( const Mat& saliencyMap, Mat& binaryMap );
.. ocv:function:: bool computeBinaryMap( const Mat& saliencyMap, Mat& binaryMap )
:param saliencyMap: the saliency map obtained through one of the specialized algorithms
:param binaryMap : the binary map
:param binaryMap: the binary map
MotionSaliency
@ -55,7 +55,7 @@ MotionSaliency class::
Objectness
--------------
----------
.. ocv:class:: Objectness

@ -1,72 +0,0 @@
Saliency categories
============================
.. highlight:: cpp
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
--------------
.. ocv:class:: TrackerSampler
StaticSaliency class::
class CV_EXPORTS_W StaticSaliency : public virtual Saliency
{
public:
bool computeBinaryMap( const Mat& saliencyMap, Mat& binaryMap );
protected:
virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap ) = 0;
};
StaticSaliency::computeBinaryMap
-------------------------------
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.
.. ocv:function:: bool computeBinaryMap( const Mat& saliencyMap, Mat& binaryMap );
:param saliencyMap: the saliency map obtained through one of the specialized algorithms
:param binaryMap : the binary map
MotionSaliency
--------------
.. ocv:class:: MotionSaliency
MotionSaliency class::
class CV_EXPORTS_W MotionSaliency : public virtual Saliency
{
protected:
virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap ) = 0;
};
Objectness
--------------
.. ocv:class:: Objectness
Objectness class::
class CV_EXPORTS_W Objectness : public virtual Saliency
{
protected:
virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap ) = 0;
};

@ -11,7 +11,7 @@ Presently, the Spectral Residual approach [SR]_ has been implemented.
SpectralResidual
------------------------------
----------------
Starting from the principle of natural image statistics, this method simulate the behavior of pre-attentive visual search. The algorithm analyze the log spectrum of each image and obtain the spectral residual. Then transform the spectral residual to spatial domain to obtain the saliency map, which suggests the positions of proto-objects.
@ -30,7 +30,7 @@ Implementation of SpectralResidual from :ocv:class:`StaticSaliency`::
typedef void (Algorithm::*SizeSetter)( const Ptr<Size> & );
Ptr<Size> getWsize();
void setWsize( const Ptr<Size> &arrPtr );
void setWsize( const Ptr<Size> &newSize );
void read( const FileNode& fn );
void write( FileStorage& fs ) const;
@ -41,3 +41,41 @@ Implementation of SpectralResidual from :ocv:class:`StaticSaliency`::
};
StaticSaliencySpectralResidual::StaticSaliencySpectralResidual
--------------------------------------------------------------
Constructor
.. ocv:function:: StaticSaliencySpectralResidual::StaticSaliencySpectralResidual()
StaticSaliencySpectralResidual::getWsize
----------------------------------------
Return the resized image size.
.. ocv:function:: Ptr<Size> StaticSaliencySpectralResidual::getWsize()
StaticSaliencySpectralResidual::setWsize
----------------------------------------
Set the dimension to which the image should be resized.
.. ocv:function:: StaticSaliencySpectralResidual::void setWsize( const Ptr<Size> &newSize )
:param newSize: dimension to which the image should be resized
StaticSaliencySpectralResidual::computeSaliency
-----------------------------------------------
Performs all the operations and calls all internal functions necessary for the accomplishment of spectral residual saliency map.
.. ocv:function:: bool StaticSaliencySpectralResidual::computeSaliency( const InputArray image, OutputArray saliencyMap )
:param image: input image. According to the needs of this specialized saliency algorithm, the param image is a single *Mat*
:param saliencyMap: saliency map. According to the result given by this specialized saliency algorithm, the saliency map is a single *Mat*

@ -1,43 +0,0 @@
Static Saliency algorithms
============================
.. highlight:: cpp
Algorithms belonging to this category, exploit different image features that allow to detect salient objects in a non dynamic scenarios.
Presently, the Spectral Residual approach [SR]_ has been implemented.
.. [SR] Hou, Xiaodi, and Liqing Zhang. "Saliency detection: A spectral residual approach." Computer Vision and Pattern Recognition, 2007. CVPR'07. IEEE Conference on. IEEE, 2007.
StaticSaliencySpectralResidual
------------------------------
Starting from the principle of natural image statistics, this method simulate the behavior of pre-attentive visual search. The algorithm analyze the log spectrum of each image and obtain the spectral residual. Then transform the spectral residual to spatial domain to obtain the saliency map, which suggests the positions of proto-objects.
.. ocv:class:: StaticSaliencySpectralResidual
Implementation of SpectralResidual from :ocv:class:`StaticSaliency`::
class CV_EXPORTS_W StaticSaliencySpectralResidual : public StaticSaliency
{
public:
StaticSaliencySpectralResidual();
~StaticSaliencySpectralResidual();
typedef Ptr<Size> (Algorithm::*SizeGetter)();
typedef void (Algorithm::*SizeSetter)( const Ptr<Size> & );
Ptr<Size> getWsize();
void setWsize( const Ptr<Size> &arrPtr );
void read( const FileNode& fn );
void write( FileStorage& fs ) const;
protected:
bool computeSaliencyImpl( const InputArray src, OutputArray dst );
};

@ -1 +0,0 @@
Subproject commit aa0a3275061fc1bc8c0d6464ff21b2c7b41c6179

@ -71,13 +71,13 @@ class CV_EXPORTS_W StaticSaliencySpectralResidual : public StaticSaliency
typedef void (Algorithm::*SizeSetter)( const Ptr<Size> & );
Ptr<Size> getWsize();
void setWsize( const Ptr<Size> &arrPtr );
void setWsize( const Ptr<Size> &newSize );
void read( const FileNode& fn );
void write( FileStorage& fs ) const;
protected:
bool computeSaliencyImpl( const InputArray src, OutputArray dst );
bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap );
AlgorithmInfo* info() const;CV_PROP_RW
Ptr<Size> resizedImageSize;
@ -105,20 +105,19 @@ class CV_EXPORTS_W ObjectnessBING : public Objectness
void setTrainingPath( string trainingPath );
void setBBResDir( string resultsDir );
protected:
bool computeSaliencyImpl( const InputArray src, OutputArray dst );
bool computeSaliencyImpl( const InputArray image, OutputArray objectnessBoundingBox );
AlgorithmInfo* info() const;
private:
// Parameters
enum
{
MAXBGR,
HSV,
G
};
{
MAXBGR,
HSV,
G
};
double _base, _logBase; // base for window size quantization
int _W; // As described in the paper: #Size, Size(_W, _H) of feature window.

@ -476,7 +476,7 @@ void ObjectnessBING::write() const
}
bool ObjectnessBING::computeSaliencyImpl( const InputArray image, OutputArray objBoundingBox )
bool ObjectnessBING::computeSaliencyImpl( const InputArray image, OutputArray objectnessBoundingBox )
{
ValStructVec<float, Vec4i> finalBoxes;
getObjBndBoxesForSingleImage( image.getMat(), finalBoxes, 250 );
@ -485,7 +485,7 @@ bool ObjectnessBING::computeSaliencyImpl( const InputArray image, OutputArray ob
// At the top there are the rectangles with higher values, ie more
// likely to have objects in them.
vector<Vec4i> sortedBB = finalBoxes.getSortedStructVal();
Mat( sortedBB ).copyTo( objBoundingBox );
Mat( sortedBB ).copyTo( objectnessBoundingBox );
// List of the rectangles' objectness value
unsigned long int valIdxesSize = finalBoxes.getvalIdxes().size();

Loading…
Cancel
Save