1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Implementation of bit-exact resize. Internal calls to linear resize updated to use bit-exact version. (#9468)

This commit is contained in:
Vitaly Tuzov
2017-12-13 15:00:38 +03:00
committed by Vadim Pisarevsky
parent 84ee4d701a
commit 51cb56ef2c
57 changed files with 1300 additions and 112 deletions
+3 -3
View File
@@ -1814,7 +1814,7 @@ public:
if( sz == img.size() )
smallerImg = Mat(sz, img.type(), img.data, img.step);
else
resize(img, smallerImg, sz);
resize(img, smallerImg, sz, 0, 0, INTER_LINEAR_EXACT);
hog->detect(smallerImg, locations, hitsWeights, hitThreshold, winStride, padding);
Size scaledWinSize = Size(cvRound(hog->winSize.width*scale), cvRound(hog->winSize.height*scale));
@@ -2031,7 +2031,7 @@ static bool ocl_detectMultiScale(InputArray _img, std::vector<Rect> &found_locat
}
else
{
resize(_img, image_scale, effect_size);
resize(_img, image_scale, effect_size, 0, 0, INTER_LINEAR_EXACT);
if(!ocl_detect(image_scale, locations, hit_threshold, win_stride, oclSvmDetector, blockSize, cellSize, nbins,
blockStride, winSize, gammaCorrection, L2HysThreshold, sigma, free_coef, signedGradient))
return false;
@@ -3525,7 +3525,7 @@ public:
if( sz == img.size() )
smallerImg = Mat(sz, img.type(), img.data, img.step);
else
resize(img, smallerImg, sz);
resize(img, smallerImg, sz, 0, 0, INTER_LINEAR_EXACT);
hog->detectROI(smallerImg, (*locations)[i].locations, dets, (*locations)[i].confidences, hitThreshold, Size(), padding);
Size scaledWinSize = Size(cvRound(hog->winSize.width*scale), cvRound(hog->winSize.height*scale));