### Navigation

- index
- next |
- previous |
- OpenCV 3.0.0-dev documentation »
- OpenCV API Reference »
- Saliency API »

# Common Interfaces of Saliency

## Saliency : Algorithm

class `Saliency`

Base abstract class for Saliency algorithms:

    class CV_EXPORTS 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.

C++:`` static Ptr<Saliency> `Saliency::``create`(const String& saliencyType)

  Parameters: | saliencyType – saliency Type

The following saliency types are now supported:

- `"SPECTRAL_RESIDUAL"` – `StaticSaliencySpectralResidual`
- `"BING"` – `ObjectnessBING`

## Saliency::computeSaliency

Performs all the operations, according to the specific algorithm created, to obtain the saliency map.

C++:`` bool `Saliency::``computeSaliency`(const InputArray image, OutputArray saliencyMap)

  Parameters: | 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> 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.

C++:`` String `Saliency::``getClassName`()`const`

## Help and Feedback

You did not find what you were looking for?

- Ask a question on the Q&A forum.
- If you think something is missing or wrong in the documentation, please file a bug report.

### Navigation

- index
- next |
- previous |
- OpenCV 3.0.0-dev documentation »
- OpenCV API Reference »
- Saliency API »