Ask Your Question

Dominik's profile - activity

2016-05-21 12:02:30 -0600 received badge  Self-Learner (source)
2016-03-27 02:36:20 -0600 received badge  Famous Question (source)
2015-05-28 16:30:51 -0600 received badge  Notable Question (source)
2014-10-30 03:51:05 -0600 received badge  Popular Question (source)
2013-07-26 07:43:56 -0600 received badge  Student (source)
2013-07-26 03:50:44 -0600 asked a question Matrix left division

Hi, I would like to achieve left division A\B of cv::Mat matrices. I was looking for a solution and found one. My problem can be solved by using cv::solve method in a form cv::solve(A,B, result_matrix) but achieved result matrix has all element equals to zero, what is not a good result because I have checked correct solution of left division in MATLAB.

Have someone used cv::solve method for left matrix division and could share with an example code for matrices defined by dimension (3x3)?

Or maybe there is an other solution about I don't know...

Thanks in advance for help :)

2013-04-08 10:59:43 -0600 answered a question Product of two matrices

Ok, below I present solution of my problem:

Mat m1 = Mat.zeros(3, 3, CvType.CV_32F);

Mat m2 = Mat.ones(3, 3, CvType.CV_32F);

Mat m3 = Mat.ones(3, 3, CvType.CV_32F);

Core.gemm(m2, m3, 1, new Mat(), 0, m1, 0);

My problem was connected with wrong type used in declaration of matrices and to multiply them we can use gemm function as it is presented above.

Thanks for help:)

2013-04-05 04:28:38 -0600 commented answer Product of two matrices

Thank You Guanta for interest of my problem. The problem was with CvType and used gemm function. Tomorrow I will present final solution, today I am not able because of some rules of forum.

2013-04-05 04:27:57 -0600 commented question Product of two matrices

Thank You berek for interest of my problem. The problem was with CvType and used gemm function. Tomorrow I will present final solution, today I am not able because of some rules of forum.

2013-04-05 02:31:40 -0600 commented question Product of two matrices

Hi, When I define my matrix like: Mat m1 = Mat.ones(3, 3, CvType.CV_32FC1); I achieved error that I am not able to use operator * too. There have to be another way to solve it...

2013-04-05 02:28:55 -0600 commented answer Product of two matrices

Hi, Yes, I have to use gemm function like this:

Core.gemm(m2, m3, 1,null, 0, m1,0);

But after that I achieved error: Exception in thread "main" java.lang.NullPointerException at org.opencv.core.Core.gemm(Core.java:3647)

Any suggestion how can I solve that?

2013-04-04 17:04:56 -0600 asked a question Product of two matrices

Hi,

I use OpenCV 2.4.4 with Java. I have problem with simple multiplication of two matrices. I define it in my code in following way:

Mat m1 = Mat.ones(3, 3, CvType.CV_16SC1);

Mat m2 = Mat.ones(3, 3, CvType.CV_16SC1);

In case if I multiply:

Mat m3 = m1 * m2;

I achieved error that operator * is undefined.

I know that OpenCv for Java provides function mul and i can use it:

Mat m3 = m1.mul(m2);

but in this way I receive only product of elementwise multiplication what is not my objective.

Is there some replacement function which allow me to multiply two matrices like * operator?

Thanks in advance :)

2013-04-03 16:46:45 -0600 commented answer opencv-2.4.4 in java.library.path error

Hi Thiago, I met with this same problem as Andrey. Your advice is a solution of our problem.

Thank You :)

2013-04-03 16:41:39 -0600 received badge  Supporter (source)