Mat 类
- java.lang.Object
-
- org.opencv.core.Mat
-
- 直接已知子类
MatOfByte
,MatOfDMatch
,MatOfDouble
,MatOfFloat
,MatOfFloat4
,MatOfFloat6
,MatOfInt
,MatOfInt4
,MatOfKeyPoint
,MatOfPoint
,MatOfPoint2f
,MatOfPoint3
,MatOfPoint3f
,MatOfRect
,MatOfRect2d
,MatOfRotatedRect
public class Mat extends java.lang.Object
-
-
嵌套类摘要
嵌套类 修饰符和类型 类 描述 静态接口
Mat.Atable<T>
静态类
Mat.Tuple2<T>
静态类
Mat.Tuple3<T>
静态类
Mat.Tuple4<T>
-
字段摘要
字段 修饰符和类型 字段 描述 long
nativeObj
-
构造器摘要
构造器 构造器 描述 Mat()
Mat(int[] sizes, int type)
Mat(int[] sizes, int type, Scalar s)
Mat(int rows, int cols, int type)
Mat(int rows, int cols, int type, java.nio.ByteBuffer data)
Mat(int rows, int cols, int type, java.nio.ByteBuffer data, long step)
Mat(int rows, int cols, int type, Scalar s)
Mat(long addr)
Mat(Mat m, Range rowRange)
Mat(Mat m, Range[] ranges)
Mat(Mat m, Range rowRange, Range colRange)
Mat(Mat m, Rect roi)
Mat(Size size, int type)
Mat(Size size, int type, Scalar s)
-
方法摘要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 描述 Mat
adjustROI(int dtop, int dbottom, int dleft, int dright)
void
assignTo(Mat m)
void
assignTo(Mat m, int type)
<T> Mat.Atable<T>
at(java.lang.Class<T> clazz, int[] idx)
<T> Mat.Atable<T>
at(java.lang.Class<T> clazz, int row, int col)
int
channels()
int
checkVector(int elemChannels)
int
checkVector(int elemChannels, int depth)
int
checkVector(int elemChannels, int depth, boolean requireContinuous)
Mat
clone()
Mat
col(int x)
Mat
colRange(int startcol, int endcol)
Mat
colRange(Range r)
int
cols()
void
convertTo(Mat m, int rtype)
void
convertTo(Mat m, int rtype, double alpha)
void
convertTo(Mat m, int rtype, double alpha, double beta)
void
copySize(Mat m)
void
copyTo(Mat m)
void
copyTo(Mat m, Mat mask)
void
create(int[] sizes, int type)
void
create(int rows, int cols, int type)
void
create(Size size, int type)
Mat
cross(Mat m)
long
dataAddr()
int
depth()
Mat
diag()
Mat
diag(int d)
static Mat
diag(Mat d)
int
dims()
double
dot(Mat m)
java.lang.String
dump()
long
elemSize()
long
elemSize1()
boolean
empty()
static Mat
eye(int rows, int cols, int type)
static Mat
eye(Size size, int type)
protected void
finalize()
double[]
get(int[] idx)
int
get(int[] idx, byte[] data)
int
get(int[] idx, double[] data)
int
get(int[] idx, float[] data)
int
get(int[] idx, int[] data)
int
get(int[] idx, short[] data)
double[]
get(int row, int col)
int
get(int row, int col, byte[] data)
int
get(int row, int col, double[] data)
int
get(int row, int col, float[] data)
int
get(int row, int col, int[] data)
int
get(int row, int col, short[] data)
long
获取原生对象地址 (getNativeObjAddr)()
int
高度 (height)()
Mat
矩阵求逆 (inv)()
Mat
inv(int method)
boolean
是否连续 (isContinuous)()
boolean
是否是子矩阵 (isSubmatrix)()
void
locateROI(Size wholeSize, Point ofs)
Mat
matMul(Mat m)
矩阵乘法 (Matrix multiplication)Mat
mul(Mat m)
逐元素乘法 (Element-wise multiplication)Mat
mul(Mat m, double scale)
带缩放因子的逐元素乘法 (Element-wise multiplication with scale factor)static Mat
ones(int[] sizes, int type)
static Mat
ones(int rows, int cols, int type)
static Mat
ones(Size size, int type)
void
push_back(Mat m)
int
put(int[] idx, byte[] data)
int
put(int[] idx, byte[] data, int offset, int length)
int
put(int[] idx, double... data)
int
put(int[] idx, float[] data)
int
put(int[] idx, int[] data)
int
put(int[] idx, short[] data)
int
put(int row, int col, byte[] data)
int
put(int row, int col, byte[] data, int offset, int length)
int
put(int row, int col, double... data)
int
put(int row, int col, float[] data)
int
put(int row, int col, int[] data)
int
put(int row, int col, short[] data)
void
释放资源 (release)()
Mat
reshape(int cn)
Mat
reshape(int cn, int rows)
Mat
reshape(int cn, int[] newshape)
Mat
row(int y)
Mat
rowRange(int startrow, int endrow)
Mat
rowRange(Range r)
int
行数 (rows)()
Mat
setTo(Mat value)
Mat
setTo(Mat value, Mat mask)
Mat
setTo(Scalar s)
Mat
setTo(Scalar value, Mat mask)
大小 (Size)
大小 (size)()
int
size(int i)
long
步长1 (step1)()
long
step1(int i)
Mat
submat(int rowStart, int rowEnd, int colStart, int colEnd)
Mat
submat(Range[] ranges)
Mat
submat(Range rowRange, Range colRange)
Mat
submat(Rect roi)
Mat
转置 (t)()
java.lang.String
转换为字符串 (toString)()
long
总元素数 (total)()
int
数据类型 (type)()
int
宽度 (width)()
static Mat
zeros(int[] sizes, int type)
static Mat
zeros(int rows, int cols, int type)
static Mat
zeros(Size size, int type)
-
-
-
构造函数详情 (Constructor Detail)
-
Mat
public Mat(long addr)
-
Mat
public Mat()
-
Mat
public Mat(int rows, int cols, int type)
-
Mat
public Mat(int rows, int cols, int type, java.nio.ByteBuffer data)
-
Mat
public Mat(int rows, int cols, int type, java.nio.ByteBuffer data, long step)
-
Mat
public Mat(Size size, int type)
-
Mat
public Mat(int[] sizes, int type)
-
Mat
public Mat(int rows, int cols, int type, Scalar s)
-
Mat
public Mat(int[] sizes, int type, Scalar s)
-
-
方法详情 (Method Detail)
-
调整ROI (adjustROI)
public Mat adjustROI(int dtop, int dbottom, int dleft, int dright)
-
赋值 (assignTo)
public void assignTo(Mat m, int type)
-
赋值 (assignTo)
public void assignTo(Mat m)
-
channels
public int channels()
-
检查向量 (checkVector)
public int checkVector(int elemChannels, int depth, boolean requireContinuous)
-
检查向量 (checkVector)
public int checkVector(int elemChannels, int depth)
-
检查向量 (checkVector)
public int checkVector(int elemChannels)
-
clone
public Mat clone()
- 重写 (Overrides)
clone
在类java.lang.Object
中
-
列 (col)
public Mat col(int x)
-
列范围 (colRange)
public Mat colRange(int startcol, int endcol)
-
dims
public int dims()
-
cols
public int cols()
-
类型转换 (convertTo)
public void convertTo(Mat m, int rtype, double alpha, double beta)
-
类型转换 (convertTo)
public void convertTo(Mat m, int rtype, double alpha)
-
类型转换 (convertTo)
public void convertTo(Mat m, int rtype)
-
复制 (copyTo)
public void copyTo(Mat m)
-
创建 (create)
public void create(int rows, int cols, int type)
-
创建 (create)
public void create(Size size, int type)
-
创建 (create)
public void create(int[] sizes, int type)
-
复制大小 (copySize)
public void copySize(Mat m)
-
dataAddr
public long dataAddr()
-
depth
public int depth()
-
diag
public Mat diag(int d)
-
diag
public Mat diag()
-
点乘 (dot)
public double dot(Mat m)
-
elemSize
public long elemSize()
-
elemSize1
public long elemSize1()
-
empty
public boolean empty()
-
单位矩阵 (eye)
public static Mat eye(int rows, int cols, int type)
-
矩阵求逆 (inv)
public Mat inv(int method)
-
矩阵求逆 (inv)
public Mat inv()
-
是否连续 (isContinuous)
public boolean isContinuous()
-
是否是子矩阵 (isSubmatrix)
public boolean isSubmatrix()
-
乘法 (mul)
public Mat mul(Mat m, double scale)
带缩放因子的逐元素乘法 (Element-wise multiplication with scale factor)- 参数 (Parameters)
m
- 进行逐元素乘法的操作数scale
- 缩放因子- 返回值 (Returns)
- 对新Mat对象的引用
-
乘法 (mul)
public Mat mul(Mat m)
逐元素乘法 (Element-wise multiplication)- 参数 (Parameters)
m
- 进行逐元素乘法的操作数- 返回值 (Returns)
- 对新Mat对象的引用
-
矩阵乘法 (matMul)
public Mat matMul(Mat m)
矩阵乘法 (Matrix multiplication)- 参数 (Parameters)
m
- 进行矩阵乘法的操作数- 返回值 (Returns)
- 对新Mat对象的引用
- 参见 (See Also)
Core.gemm(Mat, Mat, double, Mat, double, Mat, int)
-
全1矩阵 (ones)
public static Mat ones(int rows, int cols, int type)
-
全1矩阵 (ones)
public static Mat ones(int[] sizes, int type)
-
追加 (push_back)
public void push_back(Mat m)
-
释放资源 (release)
public void release()
-
重塑 (reshape)
public Mat reshape(int cn, int rows)
-
重塑 (reshape)
public Mat reshape(int cn)
-
重塑 (reshape)
public Mat reshape(int cn, int[] newshape)
-
行 (row)
public Mat row(int y)
-
行范围 (rowRange)
public Mat rowRange(int startrow, int endrow)
-
行数 (rows)
public int rows()
-
大小 (size)
public Size size()
-
大小 (size)
public int size(int i)
-
步长1 (step1)
public long step1(int i)
-
步长1 (step1)
public long step1()
-
子矩阵 (submat)
public Mat submat(int rowStart, int rowEnd, int colStart, int colEnd)
-
转置 (t)
public Mat t()
-
总元素数 (total)
public long total()
-
数据类型 (type)
public int type()
-
全0矩阵 (zeros)
public static Mat zeros(int rows, int cols, int type)
-
全0矩阵 (zeros)
public static Mat zeros(int[] sizes, int type)
-
finalize
protected void finalize() throws java.lang.Throwable
- 重写 (Overrides)
finalize
在类java.lang.Object
中- 抛出异常 (Throws)
java.lang.Throwable
-
转换为字符串 (toString)
public java.lang.String toString()
- 重写 (Overrides)
toString
在类java.lang.Object
中
-
dump
public java.lang.String dump()
-
赋值 (put)
public int put(int row, int col, double... data)
-
赋值 (put)
public int put(int[] idx, double... data)
-
赋值 (put)
public int put(int row, int col, float[] data)
-
赋值 (put)
public int put(int[] idx, float[] data)
-
赋值 (put)
public int put(int row, int col, int[] data)
-
赋值 (put)
public int put(int[] idx, int[] data)
-
赋值 (put)
public int put(int row, int col, short[] data)
-
赋值 (put)
public int put(int[] idx, short[] data)
-
赋值 (put)
public int put(int row, int col, byte[] data)
-
赋值 (put)
public int put(int[] idx, byte[] data)
-
赋值 (put)
public int put(int row, int col, byte[] data, int offset, int length)
-
赋值 (put)
public int put(int[] idx, byte[] data, int offset, int length)
-
获取值 (get)
public int get(int row, int col, byte[] data)
-
获取值 (get)
public int get(int[] idx, byte[] data)
-
获取值 (get)
public int get(int row, int col, short[] data)
-
获取值 (get)
public int get(int[] idx, short[] data)
-
获取值 (get)
public int get(int row, int col, int[] data)
-
获取值 (get)
public int get(int[] idx, int[] data)
-
获取值 (get)
public int get(int row, int col, float[] data)
-
获取值 (get)
public int get(int[] idx, float[] data)
-
获取值 (get)
public int get(int row, int col, double[] data)
-
获取值 (get)
public int get(int[] idx, double[] data)
-
获取值 (get)
public double[] get(int row, int col)
-
获取值 (get)
public double[] get(int[] idx)
-
高度 (height)
public int height()
-
宽度 (width)
public int width()
-
访问元素 (at)
public <T> Mat.Atable<T> at(java.lang.Class<T> clazz, int row, int col)
-
访问元素 (at)
public <T> Mat.Atable<T> at(java.lang.Class<T> clazz, int[] idx)
-
获取原生对象地址 (getNativeObjAddr)
public long getNativeObjAddr()
-
-