@Namespace(value="cv")
@NoOffset
public static class opencv_core.MatExpr
extends org.bytedeco.javacpp.Pointer
A+B, A-B, A+s, A-s, s+A, s-A, -A
- Scaling: A*alpha
- Per-element multiplication and division: A.mul(B), A/B, alpha/A
- Matrix multiplication: A*B
- Transposition: A.t() (means AT)
- Matrix inversion and pseudo-inversion, solving linear systems and least-squares problems:
A.inv([method]) (~ A<sup>-1</sup>), A.inv([method])*B (~ X: AX=B)
- Comparison: A cmpop B, A cmpop alpha, alpha cmpop A, where *cmpop* is one of
>, >=, ==, !=, <=, <. The result of comparison is an 8-bit single channel mask whose
elements are set to 255 (if the particular element or pair of elements satisfy the condition) or
0.
- Bitwise logical operations: A logicop B, A logicop s, s logicop A, ~A, where *logicop* is one of
&, |, ^.
- Element-wise minimum and maximum: min(A, B), min(A, alpha), max(A, B), max(A, alpha)
- Element-wise absolute value: abs(A)
- Cross-product, dot-product: A.cross(B), A.dot(B)
- Any function of matrix or matrices and scalars that returns a matrix or a scalar, such as norm,
mean, sum, countNonZero, trace, determinant, repeat, and others.
- Matrix initializers ( Mat::eye(), Mat::zeros(), Mat::ones() ), matrix comma-separated
initializers, matrix constructors and operators that extract sub-matrices (see Mat description).
- Mat_Here are examples of matrix expressions:
// compute pseudo-inverse of A, equivalent to A.inv(DECOMP_SVD)
SVD svd(A);
Mat pinvA = svd.vt.t()*Mat::diag(1./svd.w)*svd.u.t();
// compute the new vector of parameters in the Levenberg-Marquardt algorithm
x -= (A.t()*A + lambda*Mat::eye(A.cols,A.cols,A.type())).inv(DECOMP_CHOLESKY)*(A.t()*err);
// sharpen image using "unsharp mask" algorithm
Mat blurred; double sigma = 1, threshold = 5, amount = 1;
GaussianBlur(img, blurred, Size(), sigma, sigma);
Mat lowContrastMask = abs(img - blurred) < threshold;
Mat sharpened = img*(1+amount) + blurred*(-amount);
img.copyTo(sharpened, lowContrastMask);
| Constructor and Description |
|---|
MatExpr() |
MatExpr(long size)
Native array allocator.
|
MatExpr(opencv_core.Mat m) |
MatExpr(opencv_core.MatOp _op,
int _flags) |
MatExpr(opencv_core.MatOp _op,
int _flags,
opencv_core.Mat _a,
opencv_core.Mat _b,
opencv_core.Mat _c,
double _alpha,
double _beta,
opencv_core.Scalar _s) |
MatExpr(org.bytedeco.javacpp.Pointer p)
Pointer cast constructor.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic MatExpr(org.bytedeco.javacpp.Pointer p)
Pointer.Pointer(Pointer).public MatExpr(long size)
Pointer.position(long).public MatExpr()
public MatExpr(@Const @ByRef
opencv_core.Mat m)
public MatExpr(@Const
opencv_core.MatOp _op,
int _flags,
@Const @ByRef(nullValue="cv::Mat()")
opencv_core.Mat _a,
@Const @ByRef(nullValue="cv::Mat()")
opencv_core.Mat _b,
@Const @ByRef(nullValue="cv::Mat()")
opencv_core.Mat _c,
double _alpha,
double _beta,
@Const @ByRef(nullValue="cv::Scalar()")
opencv_core.Scalar _s)
public MatExpr(@Const
opencv_core.MatOp _op,
int _flags)
public opencv_core.MatExpr position(long position)
position in class org.bytedeco.javacpp.Pointer@ByVal @Name(value="operator cv::Mat") public opencv_core.Mat asMat()
@ByVal public opencv_core.Size size()
public int type()
@ByVal public opencv_core.MatExpr row(int y)
@ByVal public opencv_core.MatExpr col(int x)
@ByVal public opencv_core.MatExpr diag(int d)
@ByVal public opencv_core.MatExpr diag()
@ByVal @Name(value="operator ()") public opencv_core.MatExpr apply(@Const @ByRef opencv_core.Range rowRange, @Const @ByRef opencv_core.Range colRange)
@ByVal @Name(value="operator ()") public opencv_core.MatExpr apply(@Const @ByRef opencv_core.Rect roi)
@ByVal public opencv_core.MatExpr t()
@ByVal public opencv_core.MatExpr inv(int method)
@ByVal public opencv_core.MatExpr inv()
@ByVal public opencv_core.MatExpr mul(@Const @ByRef opencv_core.MatExpr e, double scale)
@ByVal public opencv_core.MatExpr mul(@Const @ByRef opencv_core.MatExpr e)
@ByVal public opencv_core.MatExpr mul(@Const @ByRef opencv_core.Mat m, double scale)
@ByVal public opencv_core.MatExpr mul(@Const @ByRef opencv_core.Mat m)
@ByVal public opencv_core.Mat cross(@Const @ByRef opencv_core.Mat m)
public double dot(@Const @ByRef
opencv_core.Mat m)
@MemberGetter @Const public opencv_core.MatOp op()
public int flags()
public opencv_core.MatExpr flags(int flags)
@ByRef public opencv_core.Mat a()
public opencv_core.MatExpr a(opencv_core.Mat a)
@ByRef public opencv_core.Mat b()
public opencv_core.MatExpr b(opencv_core.Mat b)
@ByRef public opencv_core.Mat c()
public opencv_core.MatExpr c(opencv_core.Mat c)
public double alpha()
public opencv_core.MatExpr alpha(double alpha)
public double beta()
public opencv_core.MatExpr beta(double beta)
@ByRef public opencv_core.Scalar s()
public opencv_core.MatExpr s(opencv_core.Scalar s)
Copyright © 2018. All rights reserved.