I see the ChangeLog about opencv4.1 about new function calcOpticalFlowSparseRLOF
. So I give a try:
Mat pre = imread("C:/Users/Lenovo/Desktop/33.png", 0);
Mat next = imread("C:/Users/Lenovo/Desktop/44.png", 0);
resize(next, next, pre.size());
vector<Point2f> points[2];
goodFeaturesToTrack(pre, points[0], 1000, 0.01, 5);
vector<uchar> status;
Mat err;
calcOpticalFlowSparseRLOF(pre, next, points[0], points[1], status, err);
This is my two images:
pre:
next:
Is it a bug or I missed something?