openCV抛出的异常

openCV抛出的异常

以下异常应该怎么解决?

OpenCV Error: Assertion failed (src1.size == src2.size) in scaleAdd, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matmul.cpp, line 2427
*** Error in `/home/gc/ccmslam_ws/devel/lib/ccmslam/ccmslamServerNode’: free(): invalid size: 0x00007ff20400c3d0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ff2596807e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7ff25968937a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ff25968d53c]
/home/gc/ccmslam_ws/devel/.private/ccmslam/lib/libccmslam_lib.so(_ZN5cslam10Sim3Solver21iterateSim3_NewMethodEiRbRSt6vectorIbSaIbEERi+0x2052)[0x7ff25a3577f2]
/home/gc/ccmslam_ws/devel/.private/ccmslam/lib/libccmslam_lib.so(_ZN5cslam10LoopFinder11ComputeSim3Ev+0x63f)[0x7ff25a2a1b8f]
/home/gc/ccmslam_ws/devel/.private/ccmslam/lib/libccmslam_lib.so(_ZN5cslam10LoopFinder3RunEv+0x1a4)[0x7ff25a2a8604]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb8c80)[0x7ff259ca1c80]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7ff25a8d76ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ff25971041d]

下面第二行是引发异常的地方:其中probability_sim3是一个float类型的变量,Sim3_midt12mt12i是(1,3,CV_32F)的Mat矩阵。

assert(Sim3_midt12.size==mt12i.size);
Sim3_midt12=probability_sim3*mt12i+Sim3_midt12.clone();
;