1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 11:21:39 +08:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2025-09-10 09:34:12 +03:00
13 changed files with 77 additions and 44 deletions

View File

@@ -1668,9 +1668,16 @@ public:
Size sz(cvRound(img.cols/scale), cvRound(img.rows/scale));
Mat smallerImg(sz, img.type(), smallerImgBuf.ptr());
if( sz == img.size() )
{
smallerImg = Mat(sz, img.type(), img.data, img.step);
}
else
resize(img, smallerImg, sz, 0, 0, INTER_LINEAR_EXACT);
{
if(getDefaultAlgorithmHint() == ALGO_HINT_APPROX)
resize(img, smallerImg, sz, 0, 0, INTER_LINEAR);
else
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));