Hi all, When I run the following code:
const Mat A( 10, 20, CV_32FC1, Scalar::all(CV_PI) );
const Mat B( A.size(), CV_8UC1, Scalar::all(10) );
Mat C( A.size(), A.type() );
C = A + B;
I get the run-time error:
OpenCV Error: Bad argument (When the input arrays in add/subtract/multiply/divide functions have different types, the output array type must be explicitly specified) in arithm_op, file /usr/local/src/OpenCV/modules/core/src/arithm.cpp, line 1269
So, is there a way to explicitly specify the output array type of A+B as float? Thanks