OpenCV for Unity  2.6.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.9.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
OpenCVForUnity.CoreModule.Scalar Class Reference
Inheritance diagram for OpenCVForUnity.CoreModule.Scalar:

Public Member Functions

 Scalar (double v0, double v1, double v2, double v3)
 
 Scalar (double v0, double v1, double v2)
 
 Scalar (double v0, double v1)
 
 Scalar (double v0)
 
 Scalar (double[] vals)
 
void set (double[] vals)
 
Scalar clone ()
 
Scalar mul (Scalar it, double scale)
 
Scalar mul (Scalar it)
 
Scalar conj ()
 
bool isReal ()
 
override int GetHashCode ()
 
override bool Equals (Object obj)
 
override string ToString ()
 
bool Equals (Scalar a)
 

Static Public Member Functions

static Scalar all (double v)
 
static Scalar operator- (Scalar a)
 
static Scalar operator+ (Scalar a, Scalar b)
 
static Scalar operator- (Scalar a, Scalar b)
 
static Scalar operator* (Scalar a, Scalar b)
 
static Scalar operator* (Scalar a, double alpha)
 
static Scalar operator* (double alpha, Scalar a)
 
static Scalar operator/ (Scalar a, Scalar b)
 
static Scalar operator/ (Scalar a, double alpha)
 
static Scalar operator/ (double a, Scalar b)
 
static bool operator== (Scalar a, Scalar b)
 
static bool operator!= (Scalar a, Scalar b)
 

Public Attributes

double [] val
 

Detailed Description

Template class for a 4-element vector derived from Vec.

template<typename _Tp> class CV_EXPORTS Scalar_ : public Vec<_Tp, 4>

// C++ code:

public:

//! various constructors

Scalar_();

Scalar_(_Tp v0, _Tp v1, _Tp v2=0, _Tp v3=0);

Scalar_(const CvScalar& s);

Scalar_(_Tp v0);

//! returns a scalar with all elements set to v0

static Scalar_<_Tp> all(_Tp v0);

//! conversion to the old-style CvScalar

operator CvScalar() const;

//! conversion to another data type

template<typename T2> operator Scalar_<T2>() const;

//! per-element product

Scalar_<Tp> mul(const Scalar<_Tp>& t, double scale=1) const;

// returns (v0, -v1, -v2, -v3)

Scalar_<_Tp> conj() const;

// returns true iff v1 == v2 == v3 == 0

bool isReal() const;

};

typedef Scalar_<double> Scalar;

Being derived from Vec<Tp, 4>, Scalar and Scalar can be used just as typical 4-element vectors. In addition, they can be converted to/from CvScalar. The type Scalar is widely used in OpenCV to pass pixel values.

See also
org.opencv.core.Scalar_

Constructor & Destructor Documentation

◆ Scalar() [1/5]

OpenCVForUnity.CoreModule.Scalar.Scalar ( double  v0,
double  v1,
double  v2,
double  v3 
)

◆ Scalar() [2/5]

OpenCVForUnity.CoreModule.Scalar.Scalar ( double  v0,
double  v1,
double  v2 
)

◆ Scalar() [3/5]

OpenCVForUnity.CoreModule.Scalar.Scalar ( double  v0,
double  v1 
)

◆ Scalar() [4/5]

OpenCVForUnity.CoreModule.Scalar.Scalar ( double  v0)

◆ Scalar() [5/5]

OpenCVForUnity.CoreModule.Scalar.Scalar ( double []  vals)

Member Function Documentation

◆ all()

static Scalar OpenCVForUnity.CoreModule.Scalar.all ( double  v)
static

◆ clone()

Scalar OpenCVForUnity.CoreModule.Scalar.clone ( )

◆ conj()

Scalar OpenCVForUnity.CoreModule.Scalar.conj ( )

◆ Equals() [1/2]

bool OpenCVForUnity.CoreModule.Scalar.Equals ( Scalar  a)

◆ Equals() [2/2]

override bool OpenCVForUnity.CoreModule.Scalar.Equals ( Object  obj)

◆ GetHashCode()

override int OpenCVForUnity.CoreModule.Scalar.GetHashCode ( )

◆ isReal()

bool OpenCVForUnity.CoreModule.Scalar.isReal ( )

◆ mul() [1/2]

Scalar OpenCVForUnity.CoreModule.Scalar.mul ( Scalar  it,
double  scale 
)

◆ mul() [2/2]

Scalar OpenCVForUnity.CoreModule.Scalar.mul ( Scalar  it)

◆ operator!=()

static bool OpenCVForUnity.CoreModule.Scalar.operator!= ( Scalar  a,
Scalar  b 
)
static

◆ operator*() [1/3]

static Scalar OpenCVForUnity.CoreModule.Scalar.operator* ( Scalar  a,
Scalar  b 
)
static

◆ operator*() [2/3]

static Scalar OpenCVForUnity.CoreModule.Scalar.operator* ( Scalar  a,
double  alpha 
)
static

◆ operator*() [3/3]

static Scalar OpenCVForUnity.CoreModule.Scalar.operator* ( double  alpha,
Scalar  a 
)
static

◆ operator+()

static Scalar OpenCVForUnity.CoreModule.Scalar.operator+ ( Scalar  a,
Scalar  b 
)
static

◆ operator-() [1/2]

static Scalar OpenCVForUnity.CoreModule.Scalar.operator- ( Scalar  a)
static

◆ operator-() [2/2]

static Scalar OpenCVForUnity.CoreModule.Scalar.operator- ( Scalar  a,
Scalar  b 
)
static

◆ operator/() [1/3]

static Scalar OpenCVForUnity.CoreModule.Scalar.operator/ ( Scalar  a,
Scalar  b 
)
static

◆ operator/() [2/3]

static Scalar OpenCVForUnity.CoreModule.Scalar.operator/ ( Scalar  a,
double  alpha 
)
static

◆ operator/() [3/3]

static Scalar OpenCVForUnity.CoreModule.Scalar.operator/ ( double  a,
Scalar  b 
)
static

◆ operator==()

static bool OpenCVForUnity.CoreModule.Scalar.operator== ( Scalar  a,
Scalar  b 
)
static

◆ set()

void OpenCVForUnity.CoreModule.Scalar.set ( double []  vals)

◆ ToString()

override string OpenCVForUnity.CoreModule.Scalar.ToString ( )

Member Data Documentation

◆ val

double [] OpenCVForUnity.CoreModule.Scalar.val

The documentation for this class was generated from the following files: