Reputation: 307
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 source/library but also don't know how to use..)
Thanks!
Upvotes: 1
Views: 1361
Reputation: 10892
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
Upvotes: 0