You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am seeing an issue where when I set features before calling flow and read the features back they are the same. I can see that the features are actually changing when I trace it out:
for (int i = 0; i < prevPts.size(); i++){
cout << " prevPts " << i << " " << prevPts[i].x << " " << prevPts[i].y << endl;
}
#if CV_MAJOR_VERSION>=2 && (CV_MINOR_VERSION>4 || (CV_MINOR_VERSION==4 && CV_SUBMINOR_VERSION>=1))
if (prevPyramid.empty()) {
buildOpticalFlowPyramid(prev,prevPyramid,cv::Size(windowSize, windowSize),10);
}
buildOpticalFlowPyramid(next,pyramid,cv::Size(windowSize, windowSize),10);
calcOpticalFlowPyrLK(prevPyramid,
pyramid,
prevPts,
nextPts,
status,
err,
cv::Size(windowSize, windowSize),
maxLevel);
prevPyramid = pyramid;
pyramid.clear();
for (int i = 0; i < nextPts.size(); i++){
cout << " nextPts " << i << " " << nextPts[i].x << " " << nextPts[i].y << endl;
}
where it should be returning nextPts (which are changed after flow calculation not before) but I'm not 100% sure I understand the swapping logic to know if this change would have some other bad side effects.
The text was updated successfully, but these errors were encountered:
I guess "getCurrent" would give back the right results, but what is the difference between getCurrent() and getFeatures() ? maybe the api is a little unclear here? I suspected from naming I could use setFeatures(), calcFlow() then getFeatures()....
I am seeing an issue where when I set features before calling flow and read the features back they are the same. I can see that the features are actually changing when I trace it out:
you see things like:
I feel like the error is here:
where it should be returning nextPts (which are changed after flow calculation not before) but I'm not 100% sure I understand the swapping logic to know if this change would have some other bad side effects.
The text was updated successfully, but these errors were encountered: