@Name(value="cv::Scalar_<double>") @Properties(inherit=opencv_core.class) public class Scalar extends AbstractScalar
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.
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Scalar()
default constructor
|
Scalar(double v0) |
Scalar(double v0,
double v1) |
Scalar(double v0,
double v1,
double v2,
double v3) |
Scalar(Pointer p)
Pointer cast constructor.
|
Scalar(Scalar s) |
Modifier and Type | Method and Description |
---|---|
static Scalar |
all(double v0)
returns a scalar with all elements set to v0
|
Scalar |
conj()
returns (v0, -v1, -v2, -v3)
|
boolean |
isReal()
returns true iff v1 == v2 == v3 == 0
|
Scalar |
mul(Scalar a) |
Scalar |
mul(Scalar a,
double scale)
per-element product
|
Scalar |
put(Scalar s) |
blue, blue, green, green, magnitude, red, red, scale, toString
asBuffer, capacity, get, get, get, get, limit, position, put, put, put, put, sizeof
address, asByteBuffer, availablePhysicalBytes, calloc, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, totalBytes, totalPhysicalBytes, withDeallocator, zero
public Scalar(Pointer p)
Pointer.Pointer(Pointer)
.public Scalar()
public Scalar(double v0, double v1, double v2, double v3)
public Scalar(double v0, double v1)
public Scalar(double v0)
Copyright © 2020. All rights reserved.