Skip to content

saliency_StaticSaliencySpectralResidual

saliencyclassOpenCV 5.0.0
import { saliency_StaticSaliencySpectralResidual } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits saliency_StaticSaliency.

Specific Static Saliency Specialized Classes *********************************** the Spectral Residual approach from [SR]

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.

Constructors and members

static create

Create an owned saliency_StaticSaliencySpectralResidual instance with the supplied configuration.

Specific Static Saliency Specialized Classes *********************************** the Spectral Residual approach from [SR]

create(): saliency_StaticSaliencySpectralResidual | null;
Returns

The saliency_StaticSaliencySpectralResidual | null result.

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

computeSaliency

Compute the saliency

computeSaliency(image: Mat, saliencyMap: Mat): boolean;
image

The image.

saliencyMap

Output destination, filled by the native operation. The computed saliency map.

Returns

true if the saliency map is computed, false otherwise

read

Reads algorithm parameters from a file storage

read(fn: FileNode): void;
fn

fn argument (FileNode).

write

Stores algorithm parameters in a file storage

write(fs: FileStorage): void;
fs

fs argument (FileStorage).

getImageWidth

Return the image width configured on this saliency_StaticSaliencySpectralResidual object.

getImageWidth(): number;
Returns

The number result.

setImageWidth

Set the image width used by this saliency_StaticSaliencySpectralResidual object.

setImageWidth(val: number): void;
val

val argument (number).

getImageHeight

Return the image height configured on this saliency_StaticSaliencySpectralResidual object.

getImageHeight(): number;
Returns

The number result.

setImageHeight

Set the image height used by this saliency_StaticSaliencySpectralResidual object.

setImageHeight(val: number): void;
val

val argument (number).

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.