Skip to content

setRNGSeed

Core and matricesfunctionOpenCV 5.0.0
import { setRNGSeed } from '@banou/opencv-wasm'

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

ARGUMENTSseed
FUNCTIONsetRNGSeed
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Sets state of default random number generator.

The function cv::setRNGSeed sets state of default random number generator to custom value.

See: RNG, randu, randn

setRNGSeed(seed: number): void;
seed

new state for default random number generator

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.