public static class opencv_core.SparseMat extends Pointer
| Modifier and Type | Class and Description |
|---|---|
static class |
opencv_core.SparseMat.Hdr
the sparse matrix header
|
static class |
opencv_core.SparseMat.Node
sparse matrix node - element of a hash table
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Modifier and Type | Field and Description |
|---|---|
static int |
HASH_BIT
enum cv::SparseMat::
|
static int |
HASH_SCALE
enum cv::SparseMat::
|
static int |
MAGIC_VAL
enum cv::SparseMat::
|
static int |
MAX_DIM
enum cv::SparseMat::
|
| Constructor and Description |
|---|
opencv_core.SparseMat()
default constructor
|
opencv_core.SparseMat(int size) |
opencv_core.SparseMat(int dims,
int[] _sizes,
int _type) |
opencv_core.SparseMat(int dims,
IntBuffer _sizes,
int _type) |
opencv_core.SparseMat(int dims,
IntPointer _sizes,
int _type)
creates matrix of the specified size and type
|
opencv_core.SparseMat(opencv_core.CvSparseMat m)
converts old-style sparse matrix to the new-style.
|
opencv_core.SparseMat(opencv_core.Mat m)
converts dense 2d matrix to the sparse form
/**
\param m the input matrix
|
opencv_core.SparseMat(opencv_core.SparseMat m)
copy constructor
|
opencv_core.SparseMat(Pointer p) |
| Modifier and Type | Method and Description |
|---|---|
void |
addref()
manually increments the reference counter to the header.
|
opencv_core.CvSparseMat |
asCvSparseMat()
converts sparse matrix to the old-style representation; all the elements are copied.
|
void |
assignTo(opencv_core.SparseMat m) |
void |
assignTo(opencv_core.SparseMat m,
int type) |
opencv_core.SparseMatIterator |
begin()
returns the sparse matrix iterator at the matrix beginning
|
int |
channels()
returns the number of channels
|
void |
clear()
sets all the sparse matrix elements to 0, which means clearing the hash table.
|
opencv_core.SparseMat |
clone()
creates full copy of the matrix
|
void |
convertTo(opencv_core.Mat m,
int rtype) |
void |
convertTo(opencv_core.Mat m,
int rtype,
double alpha,
double beta)
converts sparse matrix to dense n-dim matrix with optional type conversion and scaling.
|
void |
convertTo(opencv_core.SparseMat m,
int rtype) |
void |
convertTo(opencv_core.SparseMat m,
int rtype,
double alpha)
multiplies all the matrix elements by the specified scale factor alpha and converts the results to the specified data type
|
void |
copyTo(opencv_core.Mat m)
converts sparse matrix to dense matrix.
|
void |
copyTo(opencv_core.SparseMat m)
copies all the data to the destination matrix.
|
void |
create(int dims,
int[] _sizes,
int _type) |
void |
create(int dims,
IntBuffer _sizes,
int _type) |
void |
create(int dims,
IntPointer _sizes,
int _type)
reallocates sparse matrix.
|
int |
depth()
returns the depth of sparse matrix elements
|
int |
dims()
returns the matrix dimensionality
|
long |
elemSize()
returns the size of each element in bytes (not including the overhead - the space occupied by SparseMat::Node elements)
|
long |
elemSize1()
returns elemSize()/channels()
|
opencv_core.SparseMatIterator |
end()
returns the sparse matrix iterator at the matrix end
|
void |
erase(int[] idx) |
void |
erase(int[] idx,
SizeTPointer hashval) |
void |
erase(IntBuffer idx) |
void |
erase(IntBuffer idx,
SizeTPointer hashval) |
void |
erase(int i0,
int i1) |
void |
erase(int i0,
int i1,
int i2) |
void |
erase(int i0,
int i1,
int i2,
SizeTPointer hashval)
erases the specified element (3D case)
|
void |
erase(int i0,
int i1,
SizeTPointer hashval)
erases the specified element (2D case)
|
void |
erase(IntPointer idx) |
void |
erase(IntPointer idx,
SizeTPointer hashval)
erases the specified element (nD case)
|
int |
flags() |
opencv_core.SparseMat |
flags(int flags) |
long |
hash(int i0)
computes the element hash value (1D case)
|
long |
hash(int[] idx) |
long |
hash(IntBuffer idx) |
long |
hash(int i0,
int i1)
computes the element hash value (2D case)
|
long |
hash(int i0,
int i1,
int i2)
computes the element hash value (3D case)
|
long |
hash(IntPointer idx)
computes the element hash value (nD case)
|
opencv_core.SparseMat.Hdr |
hdr() |
opencv_core.SparseMat |
hdr(opencv_core.SparseMat.Hdr hdr) |
byte[] |
newNode(int[] idx,
long hashval) |
ByteBuffer |
newNode(IntBuffer idx,
long hashval) |
BytePointer |
newNode(IntPointer idx,
long hashval) |
opencv_core.SparseMat.Node |
node(long nidx)
returns the value stored in the sparse martix node
|
long |
nzcount()
returns the number of non-zero elements (=the number of hash table nodes)
|
opencv_core.SparseMat |
position(int position) |
byte[] |
ptr(int[] idx,
boolean createMissing) |
byte[] |
ptr(int[] idx,
boolean createMissing,
SizeTPointer hashval) |
BytePointer |
ptr(int i0,
boolean createMissing) |
BytePointer |
ptr(int i0,
boolean createMissing,
SizeTPointer hashval)
returns pointer to the specified element (1D case)
|
ByteBuffer |
ptr(IntBuffer idx,
boolean createMissing) |
ByteBuffer |
ptr(IntBuffer idx,
boolean createMissing,
SizeTPointer hashval) |
BytePointer |
ptr(int i0,
int i1,
boolean createMissing) |
BytePointer |
ptr(int i0,
int i1,
boolean createMissing,
SizeTPointer hashval)
returns pointer to the specified element (2D case)
|
BytePointer |
ptr(int i0,
int i1,
int i2,
boolean createMissing) |
BytePointer |
ptr(int i0,
int i1,
int i2,
boolean createMissing,
SizeTPointer hashval)
returns pointer to the specified element (3D case)
|
BytePointer |
ptr(IntPointer idx,
boolean createMissing) |
BytePointer |
ptr(IntPointer idx,
boolean createMissing,
SizeTPointer hashval)
returns pointer to the specified element (nD case)
|
opencv_core.SparseMat |
put(opencv_core.Mat m)
equivalent to the corresponding constructor
|
opencv_core.SparseMat |
put(opencv_core.SparseMat m)
assignment operator.
|
void |
release() |
void |
removeNode(long hidx,
long nidx,
long previdx) |
void |
resizeHashTab(long newsize) |
IntPointer |
size()
returns the array of sizes, or NULL if the matrix is not allocated
|
int |
size(int i)
returns the size of i-th matrix dimension (or 0)
|
int |
type()
returns type of sparse matrix elements
|
address, asBuffer, asByteBuffer, capacity, capacity, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, hashCode, isNull, limit, limit, memchr, memcmp, memcpy, memmove, memset, offsetof, position, put, setNull, sizeof, toString, withDeallocator, zeropublic static final int MAGIC_VAL
public static final int MAX_DIM
public static final int HASH_SCALE
public static final int HASH_BIT
public opencv_core.SparseMat(Pointer p)
public opencv_core.SparseMat(int size)
public opencv_core.SparseMat()
public opencv_core.SparseMat(int dims,
IntPointer _sizes,
int _type)
public opencv_core.SparseMat(int dims,
IntBuffer _sizes,
int _type)
public opencv_core.SparseMat(int dims,
int[] _sizes,
int _type)
public opencv_core.SparseMat(opencv_core.SparseMat m)
public opencv_core.SparseMat(opencv_core.Mat m)
public opencv_core.SparseMat(opencv_core.CvSparseMat m)
public opencv_core.SparseMat position(int position)
public opencv_core.SparseMat put(opencv_core.SparseMat m)
public opencv_core.SparseMat put(opencv_core.Mat m)
public opencv_core.SparseMat clone()
public void copyTo(opencv_core.SparseMat m)
public void copyTo(opencv_core.Mat m)
public void convertTo(opencv_core.SparseMat m, int rtype, double alpha)
public void convertTo(opencv_core.SparseMat m, int rtype)
public void convertTo(opencv_core.Mat m, int rtype, double alpha, double beta)
public void convertTo(opencv_core.Mat m, int rtype)
public void assignTo(opencv_core.SparseMat m, int type)
public void assignTo(opencv_core.SparseMat m)
public void create(int dims,
IntPointer _sizes,
int _type)
public void create(int dims,
IntBuffer _sizes,
int _type)
public void create(int dims,
int[] _sizes,
int _type)
public void clear()
public void addref()
public void release()
public opencv_core.CvSparseMat asCvSparseMat()
public long elemSize()
public long elemSize1()
public int type()
public int depth()
public int channels()
public IntPointer size()
public int size(int i)
public int dims()
public long nzcount()
public long hash(int i0)
public long hash(int i0,
int i1)
public long hash(int i0,
int i1,
int i2)
public long hash(IntPointer idx)
public long hash(IntBuffer idx)
public long hash(int[] idx)
public BytePointer ptr(int i0, boolean createMissing, SizeTPointer hashval)
public BytePointer ptr(int i0, boolean createMissing)
public BytePointer ptr(int i0, int i1, boolean createMissing, SizeTPointer hashval)
public BytePointer ptr(int i0, int i1, boolean createMissing)
public BytePointer ptr(int i0, int i1, int i2, boolean createMissing, SizeTPointer hashval)
public BytePointer ptr(int i0, int i1, int i2, boolean createMissing)
public BytePointer ptr(IntPointer idx, boolean createMissing, SizeTPointer hashval)
public BytePointer ptr(IntPointer idx, boolean createMissing)
public ByteBuffer ptr(IntBuffer idx, boolean createMissing, SizeTPointer hashval)
public ByteBuffer ptr(IntBuffer idx, boolean createMissing)
public byte[] ptr(int[] idx,
boolean createMissing,
SizeTPointer hashval)
public byte[] ptr(int[] idx,
boolean createMissing)
public void erase(int i0,
int i1,
SizeTPointer hashval)
public void erase(int i0,
int i1)
public void erase(int i0,
int i1,
int i2,
SizeTPointer hashval)
public void erase(int i0,
int i1,
int i2)
public void erase(IntPointer idx, SizeTPointer hashval)
public void erase(IntPointer idx)
public void erase(IntBuffer idx, SizeTPointer hashval)
public void erase(IntBuffer idx)
public void erase(int[] idx,
SizeTPointer hashval)
public void erase(int[] idx)
public opencv_core.SparseMatIterator begin()
public opencv_core.SparseMatIterator end()
public opencv_core.SparseMat.Node node(long nidx)
public BytePointer newNode(IntPointer idx, long hashval)
public ByteBuffer newNode(IntBuffer idx, long hashval)
public byte[] newNode(int[] idx,
long hashval)
public void removeNode(long hidx,
long nidx,
long previdx)
public void resizeHashTab(long newsize)
public int flags()
public opencv_core.SparseMat flags(int flags)
public opencv_core.SparseMat.Hdr hdr()
public opencv_core.SparseMat hdr(opencv_core.SparseMat.Hdr hdr)
Copyright © 2014. All Rights Reserved.