Commit cc97c57f authored by Alexander Smorkalov's avatar Alexander Smorkalov

Accuracy fix for blenaders in stitching module.

parent 54f52c3f
......@@ -476,9 +476,11 @@ static bool ocl_normalizeUsingWeightMap(InputArray _weight, InputOutputArray _ma
void normalizeUsingWeightMap(InputArray _weight, InputOutputArray _src)
{
Mat src = _src.getMat();
Mat weight = _weight.getMat();
Mat src;
Mat weight;
#ifdef HAVE_TEGRA_OPTIMIZATION
src = _src.getMat();
weight = _weight.getMat();
if(tegra::normalizeUsingWeightMap(weight, src))
return;
#endif
......@@ -488,9 +490,12 @@ void normalizeUsingWeightMap(InputArray _weight, InputOutputArray _src)
!ocl_normalizeUsingWeightMap(_weight, _src) )
#endif
{
src = _src.getMat();
weight = _weight.getMat();
CV_Assert(src.type() == CV_16SC3);
if(weight.type() == CV_32FC1)
if (weight.type() == CV_32FC1)
{
for (int y = 0; y < src.rows; ++y)
{
......
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