relates #16655 #16653 Test code to **FAIL**: ``` Mat a(Size(10, 5), CV_32FC1, 5); Mat b(Size(10, 5), CV_32FC1, 2); MatExpr r = a * b.t(); // gemm cout << r.size() << endl; cout << Mat(r).size() << endl; Mat dst; cv::add(r, Scalar(1), dst); // Exception raised ``` output: ``` [10 x 5] [5 x 5] ... matrix_iterator.cpp:72: error: (-215:Assertion failed) A.size == arrays[i0]->size in function 'init' ``` --- Test code to **PASS**: ``` Mat a(Size(10, 5), CV_32FC1, 5); Mat b(Size(10, 5), CV_32FC1, 2); MatExpr r = a * b.t(); // gemm Mat dst; cv::add(Mat(r), Scalar(1), dst); cout << dst << endl; cout << r << endl; ``` (but `gemm()` is called twice due MatExpr "optimization") --- More checks: https://github.com/opencv/opencv/compare/master...alalek:check_matexpr_size
Activity