OpenCV for Unity  2.3.2
Enox Software / Please refer to OpenCV official document(http://docs.opencv.org/3.4.1/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.Scalar Class Reference
Inheritance diagram for OpenCVForUnity.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

OpenCVForUnity.Scalar.Scalar ( double  v0,
double  v1,
double  v2,
double  v3 
)
OpenCVForUnity.Scalar.Scalar ( double  v0,
double  v1,
double  v2 
)
OpenCVForUnity.Scalar.Scalar ( double  v0,
double  v1 
)
OpenCVForUnity.Scalar.Scalar ( double  v0)
OpenCVForUnity.Scalar.Scalar ( double[]  vals)

Member Function Documentation

static Scalar OpenCVForUnity.Scalar.all ( double  v)
static
Scalar OpenCVForUnity.Scalar.clone ( )
Scalar OpenCVForUnity.Scalar.conj ( )
override bool OpenCVForUnity.Scalar.Equals ( Object  obj)
bool OpenCVForUnity.Scalar.Equals ( Scalar  a)
override int OpenCVForUnity.Scalar.GetHashCode ( )
bool OpenCVForUnity.Scalar.isReal ( )
Scalar OpenCVForUnity.Scalar.mul ( Scalar  it,
double  scale 
)
Scalar OpenCVForUnity.Scalar.mul ( Scalar  it)
static bool OpenCVForUnity.Scalar.operator!= ( Scalar  a,
Scalar  b 
)
static
static Scalar OpenCVForUnity.Scalar.operator* ( Scalar  a,
Scalar  b 
)
static
static Scalar OpenCVForUnity.Scalar.operator* ( Scalar  a,
double  alpha 
)
static
static Scalar OpenCVForUnity.Scalar.operator* ( double  alpha,
Scalar  a 
)
static
static Scalar OpenCVForUnity.Scalar.operator+ ( Scalar  a,
Scalar  b 
)
static
static Scalar OpenCVForUnity.Scalar.operator- ( Scalar  a)
static
static Scalar OpenCVForUnity.Scalar.operator- ( Scalar  a,
Scalar  b 
)
static
static Scalar OpenCVForUnity.Scalar.operator/ ( Scalar  a,
Scalar  b 
)
static
static Scalar OpenCVForUnity.Scalar.operator/ ( Scalar  a,
double  alpha 
)
static
static Scalar OpenCVForUnity.Scalar.operator/ ( double  a,
Scalar  b 
)
static
static bool OpenCVForUnity.Scalar.operator== ( Scalar  a,
Scalar  b 
)
static
void OpenCVForUnity.Scalar.set ( double[]  vals)
override string OpenCVForUnity.Scalar.ToString ( )

Member Data Documentation

double [] OpenCVForUnity.Scalar.val

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