GScalar
import { GScalar } 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.
\addtogroup gapi_data_objects
GScalar class represents cv::Scalar data in the graph.
GScalar may be associated with a cv::Scalar value, which becomes its constant value bound in graph compile time. cv::GScalar describes a functional relationship between operations consuming and producing GScalar objects.
GScalar is a virtual counterpart of cv::Scalar, which is usually used to represent the GScalar data in G-API during the execution.
See: Scalar
Constructors and members
static new
Constructs a value-initialized GScalar
GScalars may have their values be associated at graph construction time. It is useful when some operation has a GScalar input which doesn't change during the program execution, and is set only once. In this case, there is no need to declare such GScalar as a graph input.
Note: The value of GScalar may be overwritten by assigning some
other GScalar to the object using operator= -- on the
assignment, the old GScalar value is discarded.
new(s: Scalar): GScalar;sa cv::Scalar value to associate with this GScalar object.
The GScalar result. Release returned native handles with using or delete(), including handles nested in results.
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;The this result.
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.