Reputation: 33
I used mat1.convertTo(mat1, mat2.type())
but the type ofmat1
and mat2
are not the same. Why is that?
Upvotes: 1
Views: 2361
Reputation: 2337
Not all functions are in-place. This means that if you are calling the function on mat1
, then the destination matrix must be different. So try declaring another matrix and test the function.
mat1.convertTo(mat1_new, mat2.type())
Upvotes: 1