After introducing the definition of matrices, we'd like to create the first matrix in our project.
Now, if we want to create a Double matrix of a specific size in Emgu CV, it can be done by using the following line of code:
Matrix<Double> matrix = new Matrix<Double>(height, width);
Double here is the type of the elements.
height decide the size of this matrix.
We can also create this matrix by calling
CvInvoke.cvCreateMat. This process is similar to that of creating an image, which was covered in the previous chapter. But it is also used to construct a
Matrix<TDepth> object instead. The reason behind this can be found in Chapter 5, Working with Images.
Now we are going to create a 5x7 matrix, ...