Rick
Rick

Reputation: 1

OpenCV SVD Matrix format

I currently have a set of 2D Cartesian coordinates e.g. {(1,3), (2,2), (3,4)} Which will be put into a 2D array, to perform SVD properly would the matrix be put together such that the coordinates form the columns or the rows e.g.

1 3
2 2
3 4

or

1 2 3
3 2 4

I have been doing a little trial and error comparing to examples of SVD I have found online, the resulting matrix usually seems to be negated, with some of the values shuffled around.

To clarify further if I had a matrix E which was MxN as shown here http://upload.wikimedia.org/wikipedia/commons/b/bb/Matrix.svg

To define the matrix as a 2D array would it be Array[M][N] or Array[N][M]

I am assuming this actually matters due to matrix arithmetic not being commutative? Can anyone actually verify this?

Upvotes: 0

Views: 1600

Answers (1)

Rick
Rick

Reputation: 1

This link describes how to create a matrix from a set of vectors

In order to create a matrix by compounding vector like structures we need to do two things to the 'inner vector':

We need to take the transpose so that it is a row rather than a column.

We need a multiplication operation which will make it a field.

However this does not clarify the standards used for OpenCV and SVD.

Upvotes: -1

Related Questions