initialize the output flow in EMD (thanks to Daniel DeMenthon for the bug report)
authorVadim Pisarevsky <vadim.pisarevsky@gmail.com>
Thu, 26 Mar 2015 13:26:41 +0000 (16:26 +0300)
committerVadim Pisarevsky <vadim.pisarevsky@gmail.com>
Thu, 26 Mar 2015 13:26:41 +0000 (16:26 +0300)
modules/imgproc/src/emd.cpp

index 69006f3..22468da 100644 (file)
@@ -1152,6 +1152,7 @@ float cv::EMD( InputArray _signature1, InputArray _signature2,
     {
         _flow.create(signature1.rows, signature2.rows, CV_32F);
         flow = _flow.getMat();
+        flow = Scalar::all(0);
         _cflow = flow;
     }