1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-18 17:24:28 +08:00

Merge branch 4.x

This commit is contained in:
Alexander Alekhin
2023-01-28 13:04:38 +00:00
7 changed files with 79 additions and 491 deletions

View File

@@ -408,8 +408,13 @@ class SparseRLOFOpticalFlowImpl : public SparseRLOFOpticalFlow
cv::Mat(1,npoints , CV_32FC2, &nextPoints[0]).copyTo(nextPtsMat);
if (forwardBackwardThreshold > 0)
{
// use temp variable to properly initialize refPoints
// inside 'calcLocalOpticalFlow' when 'use_init_flow' and 'fwd_bwd_thresh' parameters are used
bool temp_param = param->getUseInitialFlow();
param->setUseInitialFlow(false);
// reuse image pyramids
calcLocalOpticalFlow(nextImage, prevImage, currPyramid, prevPyramid, nextPoints, refPoints, *(param.get()));
param->setUseInitialFlow(temp_param);
}
for (unsigned int r = 0; r < refPoints.size(); r++)
{