public static class opencv_core.Mat extends opencv_core.AbstractMat
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator
Modifier and Type | Field and Description |
---|---|
static int |
AUTO_STEP
enum cv::Mat::
|
static int |
CONTINUOUS_FLAG
enum cv::Mat::
|
static int |
MAGIC_VAL
enum cv::Mat::
|
static int |
SUBMATRIX_FLAG
enum cv::Mat::
|
EMPTY
bufferedImage, gamma22, gamma22inv
Constructor and Description |
---|
opencv_core.Mat()
default constructor
|
opencv_core.Mat(BytePointer p,
boolean signed) |
opencv_core.Mat(DoublePointer p) |
opencv_core.Mat(FloatPointer p) |
opencv_core.Mat(int size) |
opencv_core.Mat(int ndims,
int[] sizes,
int type) |
opencv_core.Mat(int ndims,
int[] sizes,
int type,
opencv_core.Scalar s) |
opencv_core.Mat(int ndims,
int[] sizes,
int type,
Pointer data) |
opencv_core.Mat(int ndims,
int[] sizes,
int type,
Pointer data,
SizeTPointer steps) |
opencv_core.Mat(int ndims,
IntBuffer sizes,
int type) |
opencv_core.Mat(int ndims,
IntBuffer sizes,
int type,
opencv_core.Scalar s) |
opencv_core.Mat(int ndims,
IntBuffer sizes,
int type,
Pointer data) |
opencv_core.Mat(int ndims,
IntBuffer sizes,
int type,
Pointer data,
SizeTPointer steps) |
opencv_core.Mat(int rows,
int cols,
int type)
constructs 2D matrix of the specified size and type
// (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.)
|
opencv_core.Mat(int rows,
int cols,
int type,
opencv_core.Scalar s)
constucts 2D matrix and fills it with the specified value _s.
|
opencv_core.Mat(int rows,
int cols,
int type,
Pointer data) |
opencv_core.Mat(int rows,
int cols,
int type,
Pointer data,
long step)
constructor for matrix headers pointing to user-allocated data
|
opencv_core.Mat(int ndims,
IntPointer sizes,
int type)
constructs n-dimensional matrix
|
opencv_core.Mat(int ndims,
IntPointer sizes,
int type,
opencv_core.Scalar s) |
opencv_core.Mat(int ndims,
IntPointer sizes,
int type,
Pointer data) |
opencv_core.Mat(int ndims,
IntPointer sizes,
int type,
Pointer data,
SizeTPointer steps) |
opencv_core.Mat(IntPointer p) |
opencv_core.Mat(opencv_core.CvMat m) |
opencv_core.Mat(opencv_core.CvMat m,
boolean copyData)
converts old-style CvMat to the new matrix; the data is not copied by default
|
opencv_core.Mat(opencv_core.CvMatND m) |
opencv_core.Mat(opencv_core.CvMatND m,
boolean copyData)
converts old-style CvMatND to the new matrix; the data is not copied by default
|
opencv_core.Mat(opencv_core.GpuMat m)
download data from GpuMat
|
opencv_core.Mat(opencv_core.IplImage img) |
opencv_core.Mat(opencv_core.IplImage img,
boolean copyData)
converts old-style IplImage to the new matrix; the data is not copied by default
|
opencv_core.Mat(opencv_core.Mat m)
copy constructor
|
opencv_core.Mat(opencv_core.Mat m,
opencv_core.Range rowRange) |
opencv_core.Mat(opencv_core.Mat m,
opencv_core.Range rowRange,
opencv_core.Range colRange)
creates a matrix header for a part of the bigger matrix
|
opencv_core.Mat(opencv_core.Mat m,
opencv_core.Rect roi) |
opencv_core.Mat(opencv_core.Size size,
int type) |
opencv_core.Mat(opencv_core.Size size,
int type,
opencv_core.Scalar s) |
opencv_core.Mat(opencv_core.Size size,
int type,
Pointer data) |
opencv_core.Mat(opencv_core.Size size,
int type,
Pointer data,
long step) |
opencv_core.Mat(Pointer p) |
opencv_core.Mat(ShortPointer p,
boolean signed) |
Modifier and Type | Method and Description |
---|---|
void |
_deallocate()
deallocates the matrix data
|
void |
addref()
increases the reference counter; use with care to avoid memleaks
|
opencv_core.Mat |
adjustROI(int dtop,
int dbottom,
int dleft,
int dright)
moves/resizes the current matrix ROI inside the parent matrix.
|
opencv_core.MatAllocator |
allocator()
custom allocator
|
opencv_core.Mat |
allocator(opencv_core.MatAllocator allocator) |
opencv_core.Mat |
apply(opencv_core.Range ranges) |
opencv_core.Mat |
apply(opencv_core.Range rowRange,
opencv_core.Range colRange)
extracts a rectangular sub-matrix
// (this is a generalized form of row, rowRange etc.)
|
opencv_core.Mat |
apply(opencv_core.Rect roi) |
opencv_core.CvMat |
asCvMat()
converts header to CvMat; no data is copied
|
opencv_core.CvMatND |
asCvMatND()
converts header to CvMatND; no data is copied
|
opencv_core.IplImage |
asIplImage()
converts header to IplImage; no data is copied
|
void |
assignTo(opencv_core.Mat m) |
void |
assignTo(opencv_core.Mat m,
int type) |
int |
channels()
returns element type, similar to CV_MAT_CN(cvmat->type)
|
int |
checkVector(int elemChannels) |
int |
checkVector(int elemChannels,
int depth,
boolean requireContinuous)
returns N if the matrix is 1-channel (N x ptdim) or ptdim-channel (1 x N) or (N x 1); negative number otherwise
|
opencv_core.Mat |
clone()
returns deep copy of the matrix, i.e.
|
opencv_core.Mat |
col(int x)
returns a new matrix header for the specified column
|
opencv_core.Mat |
colRange(int startcol,
int endcol)
...
|
opencv_core.Mat |
colRange(opencv_core.Range r) |
int |
cols() |
opencv_core.Mat |
cols(int cols) |
void |
convertTo(opencv_core.Mat m,
int rtype) |
void |
convertTo(opencv_core.Mat m,
int rtype,
double alpha,
double beta)
converts matrix to another datatype with optional scalng.
|
void |
copySize(opencv_core.Mat m)
internal use function; properly re-allocates _size, _step arrays
|
void |
copyTo(opencv_core.Mat m)
copies the matrix content to "m".
|
void |
copyTo(opencv_core.Mat m,
opencv_core.Mat mask)
copies those matrix elements to "m" that are marked with non-zero mask elements.
|
void |
create(int ndims,
int[] sizes,
int type) |
void |
create(int ndims,
IntBuffer sizes,
int type) |
void |
create(int rows,
int cols,
int type)
allocates new matrix data unless the matrix already has specified size and type.
|
void |
create(int ndims,
IntPointer sizes,
int type) |
void |
create(opencv_core.Size size,
int type) |
opencv_core.Mat |
cross(opencv_core.Mat m)
computes cross-product of 2 3D vectors
|
BytePointer |
data()
pointer to the data
|
opencv_core.Mat |
data(BytePointer data) |
BytePointer |
dataend() |
opencv_core.Mat |
dataend(BytePointer dataend) |
BytePointer |
datalimit() |
opencv_core.Mat |
datalimit(BytePointer datalimit) |
BytePointer |
datastart()
helper fields used in locateROI and adjustROI
|
opencv_core.Mat |
datastart(BytePointer datastart) |
int |
depth()
returns element type, similar to CV_MAT_DEPTH(cvmat->type)
|
opencv_core.Mat |
diag() |
opencv_core.Mat |
diag(int d)
...
|
static opencv_core.Mat |
diag(opencv_core.Mat d)
constructs a square diagonal matrix which main diagonal is vector "d"
|
int |
dims()
the matrix dimensionality, >= 2
|
opencv_core.Mat |
dims(int dims) |
double |
dot(opencv_core.Mat m)
computes dot-product
|
long |
elemSize()
returns element size in bytes,
// similar to CV_ELEM_SIZE(cvmat->type)
|
long |
elemSize1()
returns the size of element channel in bytes.
|
boolean |
empty()
returns true if matrix data is NULL
|
static opencv_core.MatExpr |
eye(int rows,
int cols,
int type) |
static opencv_core.MatExpr |
eye(opencv_core.Size size,
int type) |
int |
flags()
includes several bit-fields:
- the magic signature
- continuity flag
- depth
- number of channels
|
opencv_core.Mat |
flags(int flags) |
opencv_core.MatExpr |
inv() |
opencv_core.MatExpr |
inv(int method)
matrix inversion by means of matrix expressions
|
boolean |
isContinuous()
returns true iff the matrix data is continuous
// (i.e.
|
boolean |
isSubmatrix()
returns true if the matrix is a submatrix of another matrix
|
void |
locateROI(opencv_core.Size wholeSize,
opencv_core.Point ofs)
locates matrix header within a parent matrix.
|
opencv_core.MatExpr |
mul(opencv_core.Mat m) |
opencv_core.MatExpr |
mul(opencv_core.Mat m,
double scale)
per-element matrix multiplication by means of matrix expressions
|
static opencv_core.MatExpr |
ones(int rows,
int cols,
int type) |
static opencv_core.MatExpr |
ones(opencv_core.Size size,
int type) |
void |
pop_back() |
void |
pop_back(long nelems)
removes several hyper-planes from bottom of the matrix
|
opencv_core.Mat |
position(int position) |
BytePointer |
ptr() |
BytePointer |
ptr(int i0)
returns pointer to i0-th submatrix along the dimension #0
|
byte[] |
ptr(int[] idx) |
ByteBuffer |
ptr(IntBuffer idx) |
BytePointer |
ptr(int i0,
int i1)
returns pointer to (i0,i1) submatrix along the dimensions #0 and #1
|
BytePointer |
ptr(int i0,
int i1,
int i2)
returns pointer to (i0,i1,i3) submatrix along the dimensions #0, #1, #2
|
BytePointer |
ptr(IntPointer idx)
returns pointer to the matrix element
|
void |
push_back_(Pointer elem)
internal function
|
void |
push_back(opencv_core.Mat m)
adds element to the end of 1d matrix (or possibly multiple elements when _Tp=Mat)
|
opencv_core.Mat |
put(opencv_core.Mat m)
assignment operators
|
opencv_core.Mat |
put(opencv_core.MatExpr expr) |
opencv_core.Mat |
put(opencv_core.Scalar s)
sets every matrix element to s
|
IntPointer |
refcount()
pointer to the reference counter;
// when matrix points to user-allocated data, the pointer is NULL
|
opencv_core.Mat |
refcount(IntPointer refcount) |
void |
release()
decreases reference counter;
// deallocates the data when reference counter reaches 0.
|
void |
reserve(long sz)
reserves enough space to fit sz hyper-planes
|
opencv_core.Mat |
reshape(int cn) |
opencv_core.Mat |
reshape(int cn,
int rows)
creates alternative matrix header for the same data, with different
// number of channels and/or different number of rows.
|
opencv_core.Mat |
reshape(int cn,
int newndims,
int[] newsz) |
opencv_core.Mat |
reshape(int cn,
int newndims,
IntBuffer newsz) |
opencv_core.Mat |
reshape(int cn,
int newndims,
IntPointer newsz) |
void |
resize(long sz)
resizes matrix to the specified number of hyper-planes
|
void |
resize(long sz,
opencv_core.Scalar s)
resizes matrix to the specified number of hyper-planes; initializes the newly added elements
|
opencv_core.Mat |
row(int y)
returns a new matrix header for the specified row
|
opencv_core.Mat |
rowRange(int startrow,
int endrow)
...
|
opencv_core.Mat |
rowRange(opencv_core.Range r) |
int |
rows()
the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions
|
opencv_core.Mat |
rows(int rows) |
opencv_core.Mat |
setTo(opencv_core.Mat value) |
opencv_core.Mat |
setTo(opencv_core.Mat value,
opencv_core.Mat mask)
sets some of the matrix elements to s, according to the mask
|
opencv_core.Size |
size() |
int |
size(int i) |
long |
step() |
int |
step(int i) |
long |
step1() |
long |
step1(int i)
returns step/elemSize1()
|
opencv_core.MatExpr |
t()
matrix transposition by means of matrix expressions
|
long |
total()
returns the total number of matrix elements
|
int |
type()
returns element type, similar to CV_MAT_TYPE(cvmat->type)
|
static opencv_core.MatExpr |
zeros(int rows,
int cols,
int type)
Matlab-style matrix initialization
|
static opencv_core.MatExpr |
zeros(opencv_core.Size size,
int type) |
arrayChannels, arrayData, arrayDepth, arrayHeight, arrayOrigin, arrayOrigin, arrayROI, arraySize, arrayStep, arrayWidth, copyFrom, createFrom, createFrom, createFrom
applyGamma, cloneBufferedImage, copyFrom, copyFrom, copyFrom, copyTo, copyTo, copyTo, copyTo, cvSize, decodeGamma22, encodeGamma22, flipCopyWithGamma, flipCopyWithGamma, flipCopyWithGamma, flipCopyWithGamma, flipCopyWithGamma, getBufferedImage, getBufferedImage, getBufferedImage, getBufferedImage, getBufferedImageType, getByteBuffer, getByteBuffer, getDoubleBuffer, getDoubleBuffer, getFloatBuffer, getFloatBuffer, getIntBuffer, getIntBuffer, getShortBuffer, getShortBuffer, highValue, toString
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, withDeallocator, zero
public static final int MAGIC_VAL
public static final int AUTO_STEP
public static final int CONTINUOUS_FLAG
public static final int SUBMATRIX_FLAG
public opencv_core.Mat(Pointer p)
public opencv_core.Mat(int size)
public opencv_core.Mat()
public opencv_core.Mat(int rows, int cols, int type)
public opencv_core.Mat(opencv_core.Size size, int type)
public opencv_core.Mat(int rows, int cols, int type, opencv_core.Scalar s)
public opencv_core.Mat(opencv_core.Size size, int type, opencv_core.Scalar s)
public opencv_core.Mat(int ndims, IntPointer sizes, int type)
public opencv_core.Mat(int ndims, IntBuffer sizes, int type)
public opencv_core.Mat(int ndims, int[] sizes, int type)
public opencv_core.Mat(int ndims, IntPointer sizes, int type, opencv_core.Scalar s)
public opencv_core.Mat(int ndims, IntBuffer sizes, int type, opencv_core.Scalar s)
public opencv_core.Mat(int ndims, int[] sizes, int type, opencv_core.Scalar s)
public opencv_core.Mat(opencv_core.Mat m)
public opencv_core.Mat(int rows, int cols, int type, Pointer data, long step)
public opencv_core.Mat(int rows, int cols, int type, Pointer data)
public opencv_core.Mat(BytePointer p, boolean signed)
public opencv_core.Mat(ShortPointer p, boolean signed)
public opencv_core.Mat(IntPointer p)
public opencv_core.Mat(FloatPointer p)
public opencv_core.Mat(DoublePointer p)
public opencv_core.Mat(opencv_core.Size size, int type, Pointer data, long step)
public opencv_core.Mat(opencv_core.Size size, int type, Pointer data)
public opencv_core.Mat(int ndims, IntPointer sizes, int type, Pointer data, SizeTPointer steps)
public opencv_core.Mat(int ndims, IntPointer sizes, int type, Pointer data)
public opencv_core.Mat(int ndims, IntBuffer sizes, int type, Pointer data, SizeTPointer steps)
public opencv_core.Mat(int ndims, int[] sizes, int type, Pointer data, SizeTPointer steps)
public opencv_core.Mat(int ndims, int[] sizes, int type, Pointer data)
public opencv_core.Mat(opencv_core.Mat m, opencv_core.Range rowRange, opencv_core.Range colRange)
public opencv_core.Mat(opencv_core.Mat m, opencv_core.Range rowRange)
public opencv_core.Mat(opencv_core.Mat m, opencv_core.Rect roi)
public opencv_core.Mat(opencv_core.CvMat m, boolean copyData)
public opencv_core.Mat(opencv_core.CvMat m)
public opencv_core.Mat(opencv_core.CvMatND m, boolean copyData)
public opencv_core.Mat(opencv_core.CvMatND m)
public opencv_core.Mat(opencv_core.IplImage img, boolean copyData)
public opencv_core.Mat(opencv_core.IplImage img)
public opencv_core.Mat(opencv_core.GpuMat m)
public opencv_core.Mat position(int position)
public opencv_core.Mat put(opencv_core.Mat m)
public opencv_core.Mat put(opencv_core.MatExpr expr)
public opencv_core.Mat row(int y)
public opencv_core.Mat col(int x)
public opencv_core.Mat rowRange(int startrow, int endrow)
public opencv_core.Mat rowRange(opencv_core.Range r)
public opencv_core.Mat colRange(int startcol, int endcol)
public opencv_core.Mat colRange(opencv_core.Range r)
public opencv_core.Mat diag(int d)
public opencv_core.Mat diag()
public static opencv_core.Mat diag(opencv_core.Mat d)
public opencv_core.Mat clone()
public void copyTo(opencv_core.Mat m)
public void copyTo(opencv_core.Mat m, opencv_core.Mat mask)
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.Mat m, int type)
public void assignTo(opencv_core.Mat m)
public opencv_core.Mat put(opencv_core.Scalar s)
public opencv_core.Mat setTo(opencv_core.Mat value, opencv_core.Mat mask)
public opencv_core.Mat setTo(opencv_core.Mat value)
public opencv_core.Mat reshape(int cn, int rows)
public opencv_core.Mat reshape(int cn)
public opencv_core.Mat reshape(int cn, int newndims, IntPointer newsz)
public opencv_core.Mat reshape(int cn, int newndims, IntBuffer newsz)
public opencv_core.Mat reshape(int cn, int newndims, int[] newsz)
public opencv_core.MatExpr t()
public opencv_core.MatExpr inv(int method)
public opencv_core.MatExpr inv()
public opencv_core.MatExpr mul(opencv_core.Mat m, double scale)
public opencv_core.MatExpr mul(opencv_core.Mat m)
public opencv_core.Mat cross(opencv_core.Mat m)
public double dot(opencv_core.Mat m)
public static opencv_core.MatExpr zeros(int rows, int cols, int type)
public static opencv_core.MatExpr zeros(opencv_core.Size size, int type)
public static opencv_core.MatExpr ones(int rows, int cols, int type)
public static opencv_core.MatExpr ones(opencv_core.Size size, int type)
public static opencv_core.MatExpr eye(int rows, int cols, int type)
public static opencv_core.MatExpr eye(opencv_core.Size size, int type)
public void create(int rows, int cols, int type)
create
in class opencv_core.AbstractMat
public void create(opencv_core.Size size, int type)
public void create(int ndims, IntPointer sizes, int type)
public void create(int ndims, IntBuffer sizes, int type)
public void create(int ndims, int[] sizes, int type)
public void addref()
public void release()
release
in class opencv_core.AbstractMat
public void _deallocate()
public void copySize(opencv_core.Mat m)
public void reserve(long sz)
public void resize(long sz)
public void resize(long sz, opencv_core.Scalar s)
public void push_back_(Pointer elem)
public void push_back(opencv_core.Mat m)
public void pop_back(long nelems)
public void pop_back()
public void locateROI(opencv_core.Size wholeSize, opencv_core.Point ofs)
public opencv_core.Mat adjustROI(int dtop, int dbottom, int dleft, int dright)
public opencv_core.Mat apply(opencv_core.Range rowRange, opencv_core.Range colRange)
public opencv_core.Mat apply(opencv_core.Rect roi)
public opencv_core.Mat apply(opencv_core.Range ranges)
public opencv_core.CvMat asCvMat()
public opencv_core.CvMatND asCvMatND()
public opencv_core.IplImage asIplImage()
public boolean isContinuous()
public boolean isSubmatrix()
public long elemSize()
public long elemSize1()
public int type()
type
in class opencv_core.AbstractMat
public int depth()
depth
in class opencv_core.AbstractMat
public int channels()
channels
in class opencv_core.AbstractMat
public long step1(int i)
public long step1()
public boolean empty()
public long total()
public int checkVector(int elemChannels, int depth, boolean requireContinuous)
public int checkVector(int elemChannels)
public BytePointer ptr(int i0)
public BytePointer ptr()
public BytePointer ptr(int i0, int i1)
public BytePointer ptr(int i0, int i1, int i2)
public BytePointer ptr(IntPointer idx)
public ByteBuffer ptr(IntBuffer idx)
public byte[] ptr(int[] idx)
public int flags()
public opencv_core.Mat flags(int flags)
public int dims()
public opencv_core.Mat dims(int dims)
public int rows()
rows
in class opencv_core.AbstractMat
public opencv_core.Mat rows(int rows)
public int cols()
cols
in class opencv_core.AbstractMat
public opencv_core.Mat cols(int cols)
public BytePointer data()
data
in class opencv_core.AbstractMat
public opencv_core.Mat data(BytePointer data)
public IntPointer refcount()
public opencv_core.Mat refcount(IntPointer refcount)
public BytePointer datastart()
public opencv_core.Mat datastart(BytePointer datastart)
public BytePointer dataend()
public opencv_core.Mat dataend(BytePointer dataend)
public BytePointer datalimit()
public opencv_core.Mat datalimit(BytePointer datalimit)
public opencv_core.MatAllocator allocator()
public opencv_core.Mat allocator(opencv_core.MatAllocator allocator)
public opencv_core.Size size()
public int size(int i)
size
in class opencv_core.AbstractMat
public long step()
public int step(int i)
step
in class opencv_core.AbstractMat
Copyright © 2014. All Rights Reserved.