OpenCV does not support inversion of complex matrices. You have to manipulate the complex matrix in a way to form a real matrix containing the real and imaginary parts of the complex matrix. This page explains the process.
Here is the code to perform inverse of a complex matrix using the above mentioned process:
//Perform inverse of complex matrix.
cv::Mat invComplex(const cv::Mat& m)
{
//Create matrix with twice the dimensions of original
cv::Mat twiceM(m.rows * 2, m.cols * 2, CV_MAKE_TYPE(m.type(), 1));
//Separate real & imaginary parts
std::vector<cv::Mat> components;
cv::split(m, components);
cv::Mat real = components[0], imag = components[1];
//Copy values in quadrants of large matrix
real.copyTo(twiceM({ 0, 0, m.cols, m.rows })); //top-left
real.copyTo(twiceM({ m.cols, m.rows, m.cols, m.rows })); //bottom-right
imag.copyTo(twiceM({ m.cols, 0, m.cols, m.rows })); //top-right
cv::Mat(-imag).copyTo(twiceM({ 0, m.rows, m.cols, m.rows })); //bottom-left
//Invert the large matrix
cv::Mat twiceInverse = twiceM.inv();
cv::Mat inverse(m.cols, m.rows, m.type());
//Copy back real & imaginary parts
twiceInverse({ 0, 0, inverse.cols, inverse.rows }).copyTo(real);
twiceInverse({ inverse.cols, 0, inverse.cols, inverse.rows }).copyTo(imag);
//Merge real & imaginary parts into complex inverse matrix
cv::merge(components, inverse);
return inverse;
}