opencv

opencv

factory opencv

Description:
  • Specifies the opencv wrapping functions for linear and nonlinear solvers.

    • These functions are accessible via the symboling:: prefix.
    • The basic object is a Matrix (including 1D vectors and co-vectors) of double 2D arrays, e.g.:
    cv::Mat mat = cv::Mat(rows, cols, CV_64FC1, cv::Scalar(0));
    // Element access writes:
    double v = mat.at<double>(row_num, col_num)
    // Submatrix extraction writes:
    cv:Mat submat = mat(cv:Rect(col_num, row_num, col_count, row_count));
    

Methods

(static) randomOrthonormal(rows, cols) → {Matrix}

Description:
  • Returns a random orthonormal matrix.

Parameters:
Name Type Description
rows uint

The dimension of the random vectors.

cols uint

The number of vectors, default is equal to rows.

Returns:

A random orthonormal matrix.

Type
Matrix

(static) orthonormalizes(mat, squaringopt) → {Matrix}

Description:
  • Returns a random orthonormal matrix.

    • If cols < rows The rectangular matrix is made of cols unary orthogonal vectors of dimension rows.
    • If rows < cols The rectangular matrix is made of rows unary orthogonal vectors of dimension cols.
    • A standard Gram-Schmidt process is used, preserving the 1st vectors coordinates if already orthonormal.
Parameters:
Name Type Attributes Default Description
mat Matrix

The input matrix.

squaring bool <optional>
false

If true the matrix is concatenated in square matrix adding ones on the main diagonal and zeros elsewhere.

Returns:

An orthonormal matrix.

Type
Matrix

(static) rank(mat) → {unint}

Description:
  • Returns the rank of the matrix.

Parameters:
Name Type Description
mat Mat

The input matrix.

Returns:

The matrix rank.

Type
unint

(static) mat2txt(mat, onelineopt, nodataopt) → {String}

Description:
  • Returns the image data in textual form using wJSON syntax.

Parameters:
Name Type Attributes Default Description
mat Mat

The input matrix.

oneline <optional>
false

If true returns a one line string.

nodata <optional>
false

If true returns a one line string without the matrix elements but its size only.

Returns:

A string with a 2D print of the image pixel values.

Type
String

(static) putText(img, text, point) → {Scalar}

Description:
  • Write a multiline string in an image

Parameters:
Name Type Description
img Mat

The input matrix.

text String

The multiline text

point Point

Bottom-left corner of the text string in the image.

Returns:

color The text color.

Type
Scalar