Ask Your Question
0

Calculation on matrix

asked 2013-09-17 08:02:25 -0600

itay gravatar image

updated 2013-09-17 08:09:10 -0600

Hi, I would like to know if there is a easy way to make some calculations on matrix?

Like add, subtruct, multiply, divide matrix to another matrix, and calculate the power and sqrt of matrix.

For example i want to implement this line from matlab in opencv : Matrix.^2 or sqrt(Matrix)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-09-17 08:12:37 -0600

Okay the available functions are to be looked up here

But the Mat elements also allow for tons of expressions, as seen here

edit flag offensive delete link more

Comments

do you know how can i use it? what is the syntax in java. i don't know how to convert the examples in c++ to java. Thank you very much

itay gravatar imageitay ( 2013-09-17 08:23:23 -0600 )edit

Look at the java docs, but I am guessing the basic operators should be identical. The Mat class is also available there in the core library, with its expressions.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-09-17 08:32:51 -0600 )edit

Question Tools

Stats

Asked: 2013-09-17 08:02:25 -0600

Seen: 258 times

Last updated: Sep 17 '13