From bb78b01aceb937b50fa63e4e970f8e0f7c95a604 Mon Sep 17 00:00:00 2001 From: Dikay900 Date: Wed, 23 Dec 2015 10:48:36 +0100 Subject: [PATCH] fix mat copy in shape fixes #5643 --- modules/shape/src/sc_dis.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/shape/src/sc_dis.cpp b/modules/shape/src/sc_dis.cpp index 3f11e8b1bb..4d1de1281c 100644 --- a/modules/shape/src/sc_dis.cpp +++ b/modules/shape/src/sc_dis.cpp @@ -124,10 +124,8 @@ public: virtual void getImages(OutputArray _image1, OutputArray _image2) const { CV_Assert((!image1.empty()) && (!image2.empty())); - _image1.create(image1.size(), image1.type()); - _image2.create(image2.size(), image2.type()); - _image1.getMat()=image1; - _image2.getMat()=image2; + image1.copyTo(_image1); + image2.copyTo(_image2); } virtual void setIterations(int _iterations) {CV_Assert(_iterations>0); iterations=_iterations;}