Show / Hide Table of Contents

Class MatExpr

Matrix expression

Inheritance
System.Object
DisposableObject
DisposableCvObject
MatExpr
Implements
ICvPtrHolder
Inherited Members
DisposableCvObject.ptr
DisposableCvObject.CvPtr
DisposableObject.DataHandle
DisposableObject.IsDisposed
DisposableObject.IsEnabledDispose
DisposableObject.AllocatedMemory
DisposableObject.AllocatedMemorySize
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.DisposeManaged()
DisposableObject.AllocGCHandle(Object)
DisposableObject.AllocMemory(Int32)
DisposableObject.NotifyMemoryPressure(Int64)
DisposableObject.ThrowIfDisposed()
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public sealed class MatExpr : DisposableCvObject, ICvPtrHolder

Properties

| Improve this Doc View Source

Item[Range, Range]

Extracts a rectangular submatrix.

Declaration
public MatExpr this[Range rowRange, Range colRange] { get; }
Parameters
Type Name Description
OpenCvSharp.Range rowRange
OpenCvSharp.Range colRange
Property Value
Type Description
MatExpr
| Improve this Doc View Source

Item[Rect]

Extracts a rectangular submatrix.

Declaration
public MatExpr this[Rect roi] { get; }
Parameters
Type Name Description
OpenCvSharp.Rect roi
Property Value
Type Description
MatExpr
| Improve this Doc View Source

Item[Int32, Int32, Int32, Int32]

Extracts a rectangular submatrix.

Declaration
public MatExpr this[int rowStart, int rowEnd, int colStart, int colEnd] { get; }
Parameters
Type Name Description
System.Int32 rowStart
System.Int32 rowEnd
System.Int32 colStart
System.Int32 colEnd
Property Value
Type Description
MatExpr

Methods

| Improve this Doc View Source

Abs()

Computes absolute value of each matrix element

Declaration
public MatExpr Abs()
Returns
Type Description
MatExpr
| Improve this Doc View Source

Add(Mat)

Declaration
public MatExpr Add(Mat m)
Parameters
Type Name Description
Mat m
Returns
Type Description
MatExpr
| Improve this Doc View Source

Add(MatExpr)

Declaration
public MatExpr Add(MatExpr me)
Parameters
Type Name Description
MatExpr me
Returns
Type Description
MatExpr
| Improve this Doc View Source

Add(Scalar)

Declaration
public MatExpr Add(Scalar s)
Parameters
Type Name Description
OpenCvSharp.Scalar s
Returns
Type Description
MatExpr
| Improve this Doc View Source

Col(Int32)

Creates a matrix header for the specified matrix column.

Declaration
public MatExpr Col(int x)
Parameters
Type Name Description
System.Int32 x

A 0-based column index.

Returns
Type Description
MatExpr
| Improve this Doc View Source

Cross(Mat)

Computes a cross-product of two 3-element vectors.

Declaration
public Mat Cross(Mat m)
Parameters
Type Name Description
Mat m

Another cross-product operand.

Returns
Type Description
Mat
| Improve this Doc View Source

Diag(MatDiagType)

Extracts a diagonal from a matrix

Declaration
public MatExpr Diag(MatDiagType d = MatDiagType.Main)
Parameters
Type Name Description
MatDiagType d

d index of the diagonal, with the following values:

  • d=0 is the main diagonal.
  • d<0 is a diagonal from the lower half. For example, d=-1 means the diagonal is set immediately below the main one.
  • d>0 is a diagonal from the upper half. For example, d=1 means the diagonal is set immediately above the main one.
Returns
Type Description
MatExpr
| Improve this Doc View Source

DisposeUnmanaged()

Releases unmanaged resources

Declaration
protected override void DisposeUnmanaged()
Overrides
DisposableCvObject.DisposeUnmanaged()
| Improve this Doc View Source

Divide(Mat)

Declaration
public MatExpr Divide(Mat m)
Parameters
Type Name Description
Mat m
Returns
Type Description
MatExpr
| Improve this Doc View Source

Divide(MatExpr)

Declaration
public MatExpr Divide(MatExpr me)
Parameters
Type Name Description
MatExpr me
Returns
Type Description
MatExpr
| Improve this Doc View Source

Divide(Double)

Declaration
public MatExpr Divide(double s)
Parameters
Type Name Description
System.Double s
Returns
Type Description
MatExpr
| Improve this Doc View Source

Dot(Mat)

Computes a dot-product of two vectors.

Declaration
public double Dot(Mat m)
Parameters
Type Name Description
Mat m

another dot-product operand.

Returns
Type Description
System.Double
| Improve this Doc View Source

FromMat(Mat)

Convert cv::Mat to cv::MatExpr

Declaration
public static MatExpr FromMat(Mat mat)
Parameters
Type Name Description
Mat mat
Returns
Type Description
MatExpr
| Improve this Doc View Source

Inv(DecompTypes)

Inverses a matrix.

Declaration
public MatExpr Inv(DecompTypes method = DecompTypes.LU)
Parameters
Type Name Description
DecompTypes method
Returns
Type Description
MatExpr
| Improve this Doc View Source

Mul(Mat, Double)

Performs an element-wise multiplication or division of the two matrices.

Declaration
public MatExpr Mul(Mat m, double scale = 1)
Parameters
Type Name Description
Mat m

Another array of the same type and the same size as this, or a matrix expression.

System.Double scale

Optional scale factor.

Returns
Type Description
MatExpr
| Improve this Doc View Source

Mul(MatExpr, Double)

Performs an element-wise multiplication or division of the two matrices.

Declaration
public MatExpr Mul(MatExpr e, double scale = 1)
Parameters
Type Name Description
MatExpr e

Another array of the same type and the same size as this, or a matrix expression.

System.Double scale

Optional scale factor.

Returns
Type Description
MatExpr
| Improve this Doc View Source

Multiply(Mat)

Declaration
public MatExpr Multiply(Mat m)
Parameters
Type Name Description
Mat m
Returns
Type Description
MatExpr
| Improve this Doc View Source

Multiply(MatExpr)

Declaration
public MatExpr Multiply(MatExpr me)
Parameters
Type Name Description
MatExpr me
Returns
Type Description
MatExpr
| Improve this Doc View Source

Multiply(Double)

Declaration
public MatExpr Multiply(double s)
Parameters
Type Name Description
System.Double s
Returns
Type Description
MatExpr
| Improve this Doc View Source

Negate()

Declaration
public MatExpr Negate()
Returns
Type Description
MatExpr
| Improve this Doc View Source

OnesComplement()

Declaration
public MatExpr OnesComplement()
Returns
Type Description
MatExpr
| Improve this Doc View Source

Plus()

Declaration
public MatExpr Plus()
Returns
Type Description
MatExpr
| Improve this Doc View Source

Row(Int32)

Creates a matrix header for the specified matrix row.

Declaration
public MatExpr Row(int y)
Parameters
Type Name Description
System.Int32 y

A 0-based row index.

Returns
Type Description
MatExpr
| Improve this Doc View Source

Size()

Returns the size of a matrix element.

Declaration
public Size Size()
Returns
Type Description
OpenCvSharp.Size
| Improve this Doc View Source

SubMat(Range, Range)

Extracts a rectangular submatrix.

Declaration
public MatExpr SubMat(Range rowRange, Range colRange)
Parameters
Type Name Description
OpenCvSharp.Range rowRange
OpenCvSharp.Range colRange
Returns
Type Description
MatExpr
| Improve this Doc View Source

SubMat(Rect)

Extracts a rectangular submatrix.

Declaration
public MatExpr SubMat(Rect roi)
Parameters
Type Name Description
OpenCvSharp.Rect roi
Returns
Type Description
MatExpr
| Improve this Doc View Source

SubMat(Int32, Int32, Int32, Int32)

Extracts a rectangular submatrix.

Declaration
public MatExpr SubMat(int rowStart, int rowEnd, int colStart, int colEnd)
Parameters
Type Name Description
System.Int32 rowStart
System.Int32 rowEnd
System.Int32 colStart
System.Int32 colEnd
Returns
Type Description
MatExpr
| Improve this Doc View Source

Subtract(Mat)

Declaration
public MatExpr Subtract(Mat m)
Parameters
Type Name Description
Mat m
Returns
Type Description
MatExpr
| Improve this Doc View Source

Subtract(MatExpr)

Declaration
public MatExpr Subtract(MatExpr me)
Parameters
Type Name Description
MatExpr me
Returns
Type Description
MatExpr
| Improve this Doc View Source

Subtract(Scalar)

Declaration
public MatExpr Subtract(Scalar s)
Parameters
Type Name Description
OpenCvSharp.Scalar s
Returns
Type Description
MatExpr
| Improve this Doc View Source

T()

Transposes a matrix.

Declaration
public MatExpr T()
Returns
Type Description
MatExpr
| Improve this Doc View Source

ToMat()

Convert to cv::Mat

Declaration
public Mat ToMat()
Returns
Type Description
Mat
| Improve this Doc View Source

Type()

Returns the type of a matrix element.

Declaration
public MatType Type()
Returns
Type Description
OpenCvSharp.MatType

Operators

| Improve this Doc View Source

Addition(Mat, MatExpr)

Declaration
public static MatExpr operator +(Mat m, MatExpr e)
Parameters
Type Name Description
Mat m
MatExpr e
Returns
Type Description
MatExpr
| Improve this Doc View Source

Addition(MatExpr, Mat)

Declaration
public static MatExpr operator +(MatExpr e, Mat m)
Parameters
Type Name Description
MatExpr e
Mat m
Returns
Type Description
MatExpr
| Improve this Doc View Source

Addition(MatExpr, MatExpr)

Declaration
public static MatExpr operator +(MatExpr e1, MatExpr e2)
Parameters
Type Name Description
MatExpr e1
MatExpr e2
Returns
Type Description
MatExpr
| Improve this Doc View Source

Addition(MatExpr, Scalar)

Declaration
public static MatExpr operator +(MatExpr e, Scalar s)
Parameters
Type Name Description
MatExpr e
OpenCvSharp.Scalar s
Returns
Type Description
MatExpr
| Improve this Doc View Source

Addition(Scalar, MatExpr)

Declaration
public static MatExpr operator +(Scalar s, MatExpr e)
Parameters
Type Name Description
OpenCvSharp.Scalar s
MatExpr e
Returns
Type Description
MatExpr
| Improve this Doc View Source

Division(Mat, MatExpr)

Declaration
public static MatExpr operator /(Mat m, MatExpr e)
Parameters
Type Name Description
Mat m
MatExpr e
Returns
Type Description
MatExpr
| Improve this Doc View Source

Division(MatExpr, Mat)

Declaration
public static MatExpr operator /(MatExpr e, Mat m)
Parameters
Type Name Description
MatExpr e
Mat m
Returns
Type Description
MatExpr
| Improve this Doc View Source

Division(MatExpr, MatExpr)

Declaration
public static MatExpr operator /(MatExpr e1, MatExpr e2)
Parameters
Type Name Description
MatExpr e1
MatExpr e2
Returns
Type Description
MatExpr
| Improve this Doc View Source

Division(MatExpr, Double)

Declaration
public static MatExpr operator /(MatExpr e, double s)
Parameters
Type Name Description
MatExpr e
System.Double s
Returns
Type Description
MatExpr
| Improve this Doc View Source

Division(Double, MatExpr)

Declaration
public static MatExpr operator /(double s, MatExpr e)
Parameters
Type Name Description
System.Double s
MatExpr e
Returns
Type Description
MatExpr
| Improve this Doc View Source

Implicit(Mat to MatExpr)

Convert cv::Mat to cv::MatExpr

Declaration
public static implicit operator MatExpr(Mat mat)
Parameters
Type Name Description
Mat mat
Returns
Type Description
MatExpr
| Improve this Doc View Source

Implicit(MatExpr to Mat)

Convert to cv::Mat

Declaration
public static implicit operator Mat(MatExpr self)
Parameters
Type Name Description
MatExpr self
Returns
Type Description
Mat
| Improve this Doc View Source

Multiply(Mat, MatExpr)

Declaration
public static MatExpr operator *(Mat m, MatExpr e)
Parameters
Type Name Description
Mat m
MatExpr e
Returns
Type Description
MatExpr
| Improve this Doc View Source

Multiply(MatExpr, Mat)

Declaration
public static MatExpr operator *(MatExpr e, Mat m)
Parameters
Type Name Description
MatExpr e
Mat m
Returns
Type Description
MatExpr
| Improve this Doc View Source

Multiply(MatExpr, MatExpr)

Declaration
public static MatExpr operator *(MatExpr e1, MatExpr e2)
Parameters
Type Name Description
MatExpr e1
MatExpr e2
Returns
Type Description
MatExpr
| Improve this Doc View Source

Multiply(MatExpr, Double)

Declaration
public static MatExpr operator *(MatExpr e, double s)
Parameters
Type Name Description
MatExpr e
System.Double s
Returns
Type Description
MatExpr
| Improve this Doc View Source

Multiply(Double, MatExpr)

Declaration
public static MatExpr operator *(double s, MatExpr e)
Parameters
Type Name Description
System.Double s
MatExpr e
Returns
Type Description
MatExpr
| Improve this Doc View Source

OnesComplement(MatExpr)

Declaration
public static MatExpr operator ~(MatExpr e)
Parameters
Type Name Description
MatExpr e
Returns
Type Description
MatExpr
| Improve this Doc View Source

Subtraction(Mat, MatExpr)

Declaration
public static MatExpr operator -(Mat m, MatExpr e)
Parameters
Type Name Description
Mat m
MatExpr e
Returns
Type Description
MatExpr
| Improve this Doc View Source

Subtraction(MatExpr, Mat)

Declaration
public static MatExpr operator -(MatExpr e, Mat m)
Parameters
Type Name Description
MatExpr e
Mat m
Returns
Type Description
MatExpr
| Improve this Doc View Source

Subtraction(MatExpr, MatExpr)

Declaration
public static MatExpr operator -(MatExpr e1, MatExpr e2)
Parameters
Type Name Description
MatExpr e1
MatExpr e2
Returns
Type Description
MatExpr
| Improve this Doc View Source

Subtraction(MatExpr, Scalar)

Declaration
public static MatExpr operator -(MatExpr e, Scalar s)
Parameters
Type Name Description
MatExpr e
OpenCvSharp.Scalar s
Returns
Type Description
MatExpr
| Improve this Doc View Source

Subtraction(Scalar, MatExpr)

Declaration
public static MatExpr operator -(Scalar s, MatExpr e)
Parameters
Type Name Description
OpenCvSharp.Scalar s
MatExpr e
Returns
Type Description
MatExpr
| Improve this Doc View Source

UnaryNegation(MatExpr)

Declaration
public static MatExpr operator -(MatExpr e)
Parameters
Type Name Description
MatExpr e
Returns
Type Description
MatExpr
| Improve this Doc View Source

UnaryPlus(MatExpr)

Declaration
public static MatExpr operator +(MatExpr e)
Parameters
Type Name Description
MatExpr e
Returns
Type Description
MatExpr

Implements

ICvPtrHolder
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX