Skip to content
RafaDdS edited this page Jun 3, 2024 · 1 revision

This class contains most of the main matrix manipulation methods. More information here.

absdiff

Prototype: static CVMat absdiff(CVMat mat1, CVMat mat2)

Returns the per-element absolute difference between two mats.

add

Prototype: static CVMat add(CVMat mat1, CVMat mat2, Dictionary additional_parameters)

Returns the per-element sum of two arrays value by value.

  • Additional parameters: mask: CVMat, dtype: Int

add_weighted

Prototype: static CVMat add_weighted(CVMat src1, double alpha, CVMat src2, double beta, double gamma, Dictionary additional_parameters)

Returns the per-element weighted sum of two arrays.

  • Additional parameters: dtype: Int

bitwise_and

Prototype: static CVMat bitwise_and(CVMat mat1, CVMat mat2, Dictionary additional_parameters)

Returns the per-element bit-wise conjunction of two arrays.

  • Additional parameters: mask: CVMat

bitwise_not

Prototype: static CVMat bitwise_not(CVMat mat, Dictionary additional_parameters)

Returns a mat with every bit of the input inverted.

  • Additional parameters: mask: CVMat

bitwise_or

Prototype: static CVMat bitwise_or(CVMat mat1, CVMat mat2, Dictionary additional_parameters)

Returns the per-element bit-wise disjunction of two arrays

  • Additional parameters: mask: CVMat

bitwise_xor

Prototype: static CVMat bitwise_xor(CVMat mat1, CVMat mat2, Dictionary additional_parameters)

Returns the per-element bit-wise "exclusive or" operation on two arrays

  • Additional parameters: mask: CVMat

convert_fp16

Prototype: static CVMat convert_fp16(CVMat mat)

Deprecated method for matrix conversion, see CVMat.convert_to.

dft

Prototype: static CVMat dft(CVMat src, Dictionary additional_parameters)

Returns a forward or inverse Discrete Fourier transform of a mat.

  • Additional parameters: flags: Int, non_zero_rows: Int

exp

Prototype: static CVMat exp(CVMat mat)

Returns the exponent of every element.

get_optimal_dft_size

Prototype: static int get_optimal_dft_size(int vecsize)

Returns the optimal DFT size for a given vector size.

hconcat

Prototype: static CVMat hconcat(CVMat mat1, CVMat mat2)

Returns the horizontal concatenation of both matrices.

log

Prototype: static CVMat log(CVMat mat)

Returns a mat with the natural logarithm of every array element.

max

Prototype: static CVMat max(CVMat mat1, CVMat mat2)

Calculates per-element maximum of two arrays.

min

Prototype: static CVMat min(CVMat mat1, CVMat mat2)

Calculates per-element minimum of two arrays

normalize

Prototype: static CVMat normalize(CVMat src, Dictionary additional_parameters)

Normalizes the norm of the mat.

  • Additional parameters: alpha: Float, beta: Float, norm_type: Int, dtype: Int, mask: CVMat

subtract

Prototype: static CVMat subtract(CVMat mat1, CVMat mat2, Dictionary additional_parameters)

Returns the subtraction of two arrays value by value.

  • Additional parameters: mask: CVMat, dtype: Int

sqrt

Prototype: static CVMat sqrt(CVMat mat)

Returns the per-element square root of the input matrix.

transpose

Prototype: static CVMat transpose(CVMat mat)

Returns the transpose of the input matrix.

vconcat

Prototype: static CVMat vconcat(CVMat mat1, CVMat mat2)

Returns the vertical concatenation of both matrices.

Clone this wiki locally