I want to process Images with Inverse function and lot of functions. For code to run fastly can any one suggest fast method among the 3 inversion methods ?
double cvInvert(const CvArr* src, CvArr* dst, int method=CV_LU)
- CV_LU Gaussian elimination with optimal pivot element chosen
- CV_SVD Singular value decomposition (SVD) method
- CV_SVD_SYM SVD method for a symmetric positively-defined matrix.
In OpenCV2.x, there's a new interface called
Mat::inv(int method)
to compute the inverse of a matrix. See reference.I made a test with each of the method, it shows that DECOMP_CHOLESKY is the fastest for the test case, and LU gives the similar result.
Here is the running resutls: