I have trouble in doing inverse of a complex matrix. As far as I know, complex matrix is simply a two-channel matrix (CV_32FC2 / CV_64FC2).
Let's say I have a matrix C:
Mat C(2, 2, CV_64FC2);
C.at(0,0)[0] = 1;
C.at(0,0)[1] = 1;
C.at(0,1)[0] = 3;
C.at(0,1)[1] = 4;
C.at(1,0)[0] = 2;
C.at(1,0)[1] = -1;
C.at(1,1)[0] = 5;
C.at(1,1)[1] = 2;
Mat InverseMat;
invert(C, InverseMat, DECOMP_SVD);
After I perform the invert function, I keep getting this error:
OpenCV Error: Assertion failed (type == CV_32F || type == CV_64F) in invert
The invert function works well with a grayscale loaded image (1 channel), but I have hard time to do inverse on complex matrix which contains real and imaginary part.
Can someone please tell me h