From: Vadim Pisarevsky Date: Mon, 30 Sep 2013 15:28:11 +0000 (+0400) Subject: some more attempts to fix compile bug on Android X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~3732^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c810d03d5c1e2d4a28987919f9c3dcbfecdc676c;p=platform%2Fupstream%2Fopencv.git some more attempts to fix compile bug on Android --- diff --git a/modules/shape/src/sc_dis.cpp b/modules/shape/src/sc_dis.cpp index 7a0893d..24e86af 100644 --- a/modules/shape/src/sc_dis.cpp +++ b/modules/shape/src/sc_dis.cpp @@ -235,7 +235,8 @@ float ShapeContextDistanceExtractorImpl::computeDistance(InputArray contour1, In set2SCE.extractSCD(set2, set2SCD, inliers2, set1SCE.getMeanDistance()); // regularization parameter with annealing rate annRate // - beta=std::pow(set1SCE.getMeanDistance(),2); + beta=set1SCE.getMeanDistance(); + beta *= beta; // match // matcher.matchDescriptors(set1SCD, set2SCD, matches, comparer, inliers1, inliers2); @@ -284,13 +285,12 @@ float ShapeContextDistanceExtractorImpl::computeDistance(InputArray contour1, In gaussWindow = Mat::zeros(warpedImage.rows, warpedImage.cols, CV_32F); for (pt=0; pt(0,pt); for (ii=0; ii(0,pt).x; - float yy = sset1.at(0,pt).y; - float val = float(std::exp( -float( (xx-jj)*(xx-jj) + (yy-ii)*(yy-ii) )/(2*sigma*sigma) ) / (sigma*sigma*2*CV_PI)); + float val = float(std::exp( -float( (p.x-jj)*(p.x-jj) + (p.y-ii)*(p.y-ii) )/(2*sigma*sigma) ) / (sigma*sigma*2*CV_PI)); gaussWindow.at(ii,jj) += val; } }