Merge pull request #11634 from vpisarev:empty_mat_with_types_2

fixes handling of empty matrices in some functions (#11634)

* a part of PR #11416 by Yuki Takehara

* moved the empty mat check in Mat::copyTo()

* fixed some test failures
This commit is contained in:
Vadim Pisarevsky
2018-05-31 19:36:39 +03:00
committed by Alexander Alekhin
parent da75e463a8
commit 7d19bd6c19
9 changed files with 42 additions and 11 deletions
+6
View File
@@ -7952,6 +7952,12 @@ public:
{
CV_INSTRUMENT_REGION()
if(_image.empty())
{
keypoints.clear();
return;
}
Mat mask = _mask.getMat(), grayImage;
UMat ugrayImage;
_InputArray gray = _image;
+6
View File
@@ -526,6 +526,12 @@ public:
{
CV_INSTRUMENT_REGION()
if(_image.empty())
{
keypoints.clear();
return;
}
Mat mask = _mask.getMat(), grayImage;
UMat ugrayImage;
_InputArray gray = _image;
+6
View File
@@ -80,6 +80,12 @@ public:
{
CV_INSTRUMENT_REGION()
if(_image.empty())
{
keypoints.clear();
return;
}
std::vector<Point2f> corners;
if (_image.isUMat())