开发者

How to compute SVD using Cimg (or maybe openCV or eigen library)?

开发者 https://www.devze.com 2023-02-05 09:41 出处:网络
May anyone give me a quick guide on how to use Cimg to compute SVD for a 3-dimension array? I just want to get the decomposition of the array in order to compress it small for speeding up further proc

May anyone give me a quick guide on how to use Cimg to compute SVD for a 3-dimension array? I just want to get the decomposition of the array in order to compress it small for speeding up further process. What value should I input at where, and how to get the output? I've been searched around and still can't understand how it works. and not really fully understand how SVD works as well..only know that it can used to decompress matrix.

At the same time I found that OpenCV and Eigen library also can done the job, do let me know their steps if is much more easier..

(Alternative for me instead of SVD is PCA, which I found its sour开发者_如何转开发ce/library but also don't know how to use..)

Thanks!


See http://cimg.sourceforge.net/reference/structcimg__library_1_1CImg.html#a9a79f3a0849388b3ec13bd140b67a12e

CImg<float> A(3,3); // A = U'*S*V
A.rand(0,1);
CImgList<float> USV = A.get_SVD(); //USV[0] = U and so forth
0

精彩评论

暂无评论...
验证码 换一张
取 消