Minor fix in blender mask conversion.
authorAndrey Kamaev <no@email>
Wed, 7 Mar 2012 20:33:35 +0000 (20:33 +0000)
committerAndrey Kamaev <no@email>
Wed, 7 Mar 2012 20:33:35 +0000 (20:33 +0000)
modules/stitching/src/blenders.cpp

index d43899e..4f0a4b1 100644 (file)
@@ -287,8 +287,8 @@ void MultiBandBlender::feed(const Mat &img, const Mat &mask, Point tl)
     }\r
     else// weight_type_ == CV_16S\r
     {\r
-        add(mask, 1, weight_map, noArray(), CV_16S);\r
-        weight_map.setTo(1, mask == 0);\r
+        mask.convetTo(weight_map, CV_16S);\r
+        add(weight_map, 1, weight_map, mask != 0);\r
     }\r
 \r
     copyMakeBorder(weight_map, weight_pyr_gauss[0], top, bottom, left, right, BORDER_CONSTANT);\r