Add checks for empty operands in Matrix expressions that#15966
Add checks for empty operands in Matrix expressions that#15966alalek merged 5 commits intoopencv:3.4from
Conversation
don't check properly.
|
I'll take care of the missing declarations. |
|
Hmmm now why would those fail .... did we just find some places where MatExpr operations are being done on empty operands? Will take a look. |
|
Test This subtest in test_undistort_badarg.cpp essentially checks that the input src matrix to I see one of two things can be done:
|
|
Looks like the problem with the test is that it expects |
|
Indeed, it's expecting the wrong one exception. I was debugging the tests in that class to see if it could be improved. Seems fine as it is. Thank you. |
|
|
||
| void checkOperandsExist(const Mat& a); | ||
| void checkOperandsExist(const Mat& a, const Mat& b); | ||
|
|
There was a problem hiding this comment.
These functions should not be a part of public OpenCV API.
Moreover, they are "local", so you should use "static" before definition instead.
There was a problem hiding this comment.
Thanks @alalek. I forgot about that.
I suppose then this is best: Remove declarations from mat.hpp and add static qualifier to checkOperandsExist in matrix_expressions.cpp. So checkOperandsExist will not be exposed outside matrix_expressions.cpp.
|
imgproc_perf test failing on Mac build, but the build farm's imgproc_perf stdio for that platform doesn't show which test failed or why. I test on Ubuntu-64/Win10-64. |
|
These sporadic failures are not related to this patch. See #16137 |
don't check properly.
More checks and tests coming soon.
resolves #15760