简体   繁体   中英

Logarithm of 3x3 matrix in opencv

I have a matrix like this.

A = 
30 10 40 10 50
90 20 60 50 40
30 10 40 10 50
90 20 60 50 40
30 10 40 10 50

and matrix p is

30 10 40
90 20 60
30 10 40

and matrix q is

10 40 10
20 60 50
10 40 10

./.. How can i compute log of p and q?

Log (p) and Log (q) ?

Anyone can help me .. I have to do this in opencv. thanks

As @cxyzs pointed out in the comments, there is a log function directly implemented in OpenCV. You can find it here in the documentation.

Here is a small example of how to use it:

cv::Mat p, q;  // Your original matrices

cv::Mat logP, logQ;
cv::log(p, logP);
cv::log(q, logQ);

// Now logP and logQ contain the logarithms of the values in p and q

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM