-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
core(MatExpr): .type() implementation bug #16655
Copy link
Copy link
Closed
Milestone
Description
MatExpr::type() may ignore channels.
Test code:
Mat a(Size(5, 5), CV_32FC3, Scalar::all(1));
Mat b(Size(5, 5), CV_32FC3, Scalar::all(2));
MatExpr ab_expr = a != b;
Mat ab_mat = ab_expr;
EXPECT_EQ(CV_8UC3, ab_expr.type())
<< "MatExpr: CV_8UC3 != " << typeToString(ab_expr.type());
EXPECT_EQ(CV_8UC3, ab_mat.type())
<< "Mat: CV_8UC3 != " << typeToString(ab_mat.type());Output (OpenCV 3.4.9-dev):
Failure
Expected equality of these values:
(((0) & ((1 << 3) - 1)) + (((3)-1) << 3))
Which is: 16
ab_expr.type()
Which is: 0
MatExpr: CV_8UC3 != CV_8UC1
exploded by #16653 and improper test code (dnn:imagesFromBlob.Regression).
Reactions are currently unavailable