OpenCV 2.4.6

org.opencv.core
Class Scalar

java.lang.Object
  extended by org.opencv.core.Scalar

public class Scalar
extends java.lang.Object

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

template class Scalar_ : public Vec<_Tp, 4> {... };

// C++ code:

typedef Scalar_ 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_

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

val

public double[] val
Constructor Detail

Scalar

public Scalar(double v0)

Scalar

public Scalar(double[] vals)

Scalar

public Scalar(double v0,
              double v1)

Scalar

public Scalar(double v0,
              double v1,
              double v2)

Scalar

public Scalar(double v0,
              double v1,
              double v2,
              double v3)
Method Detail

all

public static Scalar all(double v)

clone

public Scalar clone()
Overrides:
clone in class java.lang.Object

conj

public Scalar conj()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isReal

public boolean isReal()

mul

public Scalar mul(Scalar it)

mul

public Scalar mul(Scalar it,
                  double scale)

set

public void set(double[] vals)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

OpenCV 2.4.6 Documentation