Class cv::saliency::StaticSaliency#
#include <opencv2/saliency/saliencyBaseClasses.hpp>Collaboration diagram for cv::saliency::StaticSaliency:
Public Member Functions#
Public Member Functions inherited from cv::saliency::Saliency
Return |
Name |
Description |
|---|---|---|
Destructor. |
||
|
|
Compute the saliency. |
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::saliency::Saliency
Return |
Name |
Description |
|---|---|---|
|
|
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Protected Attributes inherited from cv::saliency::Saliency
Member Function Documentation#
computeBinaryMap()#
bool cv::saliency::StaticSaliency::computeBinaryMap(
InputArray _saliencyMap,
OutputArray _binaryMap )
Python:
cv.saliency.StaticSaliency.computeBinaryMap(_saliencyMap[, _binaryMap]) -> retval, _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
_saliencyMap— the saliency map obtained through one of the specialized algorithms_binaryMap— the binary map
computeSaliencyImpl()#
bool cv::saliency::StaticSaliency::computeSaliencyImpl(
InputArray image,
OutputArray saliencyMap )
Source file#
The documentation for this class was generated from the following file:
opencv2/saliency/saliencyBaseClasses.hpp