Commit 49207ce1 authored by Andrey Kamaev's avatar Andrey Kamaev

Minor fix in blender mask conversion.

parent cd2cc619
...@@ -287,8 +287,8 @@ void MultiBandBlender::feed(const Mat &img, const Mat &mask, Point tl) ...@@ -287,8 +287,8 @@ void MultiBandBlender::feed(const Mat &img, const Mat &mask, Point tl)
} }
else// weight_type_ == CV_16S else// weight_type_ == CV_16S
{ {
add(mask, 1, weight_map, noArray(), CV_16S); mask.convetTo(weight_map, CV_16S);
weight_map.setTo(1, mask == 0); add(weight_map, 1, weight_map, mask != 0);
} }
copyMakeBorder(weight_map, weight_pyr_gauss[0], top, bottom, left, right, BORDER_CONSTANT); copyMakeBorder(weight_map, weight_pyr_gauss[0], top, bottom, left, right, BORDER_CONSTANT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment