Accuracy fix for blenaders in stitching module.

pull/3594/head
Alexander Smorkalov 10 years ago
parent 54f52c3f45
commit cc97c57fd4
  1. 11
      modules/stitching/src/blenders.cpp

@ -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)
{

Loading…
Cancel
Save