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:
@@ -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++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user