Os seguintes erros ocorrem ao usar OpenCV para fazer operações de matriz Mat:
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(3.4.3) /home/wxb/xiazai/opencv-3.4.3/modules/core/src/matmul.cpp:1558: error: (-215:Assertion failed) type == B.type() in function 'gemm'
Snippet de código onde ocorreu o erro:
cv::Mat K(3,3,CV_32F);
E = K.t() * F * K;
O motivo do erro é que o tipo CV_32F de Mat K é inconsistente com outros tipos de matriz durante a operação e pode ser operado normalmente modificando-o para CV_64F.
cv::Mat K(3,3,CV_64F);