|
OpenCV 2.4.7 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opencv.core.Scalar
public class Scalar
Template class for a 4-element vector derived from Vec.
template
// 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
//! 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_
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.
Field Summary | |
---|---|
double[] |
val
|
Constructor Summary | |
---|---|
Scalar(double v0)
|
|
Scalar(double[] vals)
|
|
Scalar(double v0,
double v1)
|
|
Scalar(double v0,
double v1,
double v2)
|
|
Scalar(double v0,
double v1,
double v2,
double v3)
|
Method Summary | |
---|---|
static Scalar |
all(double v)
|
Scalar |
clone()
|
Scalar |
conj()
|
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
boolean |
isReal()
|
Scalar |
mul(Scalar it)
|
Scalar |
mul(Scalar it,
double scale)
|
void |
set(double[] vals)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double[] val
Constructor Detail |
---|
public Scalar(double v0)
public Scalar(double[] vals)
public Scalar(double v0, double v1)
public Scalar(double v0, double v1, double v2)
public Scalar(double v0, double v1, double v2, double v3)
Method Detail |
---|
public static Scalar all(double v)
public Scalar clone()
clone
in class java.lang.Object
public Scalar conj()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isReal()
public Scalar mul(Scalar it)
public Scalar mul(Scalar it, double scale)
public void set(double[] vals)
public java.lang.String toString()
toString
in class java.lang.Object
|
OpenCV 2.4.7 Documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |